Hello Michael, I'm working (80% done) on an extension for this. It should be finished in a few days. It doesn't feature the __C*__ things yet, but I can add a function for that too.
I'll keep you posted, Derick On Wed, 24 Apr 2002, Michael Virnstein wrote: > It would be really useful for writing functions/Classes, if > i were able to determine the __FILE__ and __LINE__ of the > script, that is calling my function, without the need to send > __FILE__ and __LINE__ as parameter to my function. > E.g. __CFILE__ for calling script and __CLINE__ for line in the > calling script would be really great. > In addition it'll be useful, if I could use trigger_error in this manner. > Most of the time i don't want to know, on which line my trigger_error > call is located, but on which line in the script that called my function, > the > error occured. it'll be nice, if trigger_error could be extended, so it > takes > to more parameters, which overwrite the default __FILE__, __LINE__ > settings of trigger error. > > Example: > > function somefunction($array) { > if (!is_array($array)) { > trigger_error("Not an array", E_USER_ERROR, __CFILE__, __CLINE__); > } > // do something with the array > } > > > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > ----------------------------------------------------------------------- Did I help you? Consider a gift: http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B ----------------------------------------------------------------------- PHP: Scripting the Web - [EMAIL PROTECTED] All your branches are belong to me! SRM: Script Running Machine - www.vl-srm.net ----------------------------------------------------------------------- -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php