This is a discussion on Knowing the name of a "parent" function. within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hey all I'm relatively new to PHP (arnt we all at some point eh?), but I'm having trouble ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hey all I'm relatively new to PHP (arnt we all at some point eh?), but
I'm having trouble trying to establish if its possible to get the name of a function that called another function. Confused ? Let me try this ... function funca () { blah blah blah blah foobar ("a string"); } function foobar ($string) { print "Function foobar, called by function " ?????? ); } Its the ?????? that I'm stuck on. I want the ???? to transpose to "funca" if possible. Any ideas ? Thanks in advance for any assistance you can give. -- Andy Jenkins UK Broadband Usergroup : http://www.uk-bug.net |
|
|||
|
"Andy Jenkins" <andy_nfTORIES@btopenworld..com> schreef in bericht
news:jrm140hcsg2o3j3ilou67g11ng1notj6u2@4ax.com... > Hey all I'm relatively new to PHP (arnt we all at some point eh?), but > I'm having trouble trying to establish if its possible to get the name > of a function that called another function. Confused ? Let me try > this ... > > function funca () { > > blah blah > blah blah > > foobar ("a string"); > } > > function foobar ($string) { > > print "Function foobar, called by function " ?????? ); > > } > > Its the ?????? that I'm stuck on. I want the ???? to transpose to > "funca" if possible. > > Any ideas ? > > Thanks in advance for any assistance you can give. > -- > Andy Jenkins > UK Broadband Usergroup : http://www.uk-bug.net Use objects! |
|
|||
|
On Sat, 28 Feb 2004 18:22:15 +0000, Andy Jenkins
<andy_nfTORIES@btopenworld..com> wrote: >Hey all I'm relatively new to PHP (arnt we all at some point eh?), but >I'm having trouble trying to establish if its possible to get the name >of a function that called another function. http://uk2.php.net/debug_backtrace -- Andy Hassall <andy@andyh.co.uk> / Space: disk usage analysis tool <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space> |