Re: looking for function (pre 4.3.x)

From: Date: Sat, 24 May 2003 15:44:02 +0000
Subject: Re: looking for function (pre 4.3.x)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-148836@lists.php.net to get a copy of this message
what I did was to use an array as my last argument on all my functions, this will have something like this. And I will us your names CallMyFunc("First arg", "second args", array( 'calling_function' => 'ParentCall', 'calling_file' => __FILE__, 'calling_line' => __LINE__, ) ); now, inside the CallMyFunc() you will get this: function CallMyFunc($ar1, $ar2, $args=array()) { extract($args); //now you have this $calling_function == 'ParentCall'; $calling_file == '/home/www/path/to/my/file.php'; $calling_line == 200; } try out something like that. Jim Lucas ----- Original Message ----- From: "Carl P. Corliss" <rabbitt@xaraya.com> To: <php-general@lists.php.net> Sent: Friday, May 23, 2003 11:21 PM Subject: [PHP] looking for function (pre 4.3.x) > Is there a known function that will give you the name of the calling function, > something like this: > > $callee = who_the_heck_called_me(); > > where $callee would then be an array with the following indices: > > calling_function > calling_file > calling_line > > or, if not, does anyone have any idea how to go about creating this? > > TIA :) > > cheers, > > -- > Carl P. Corliss > System Administrator / Developer > Xaraya Web Application Framework Project > www.xaraya.com > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#148836) next »