[PHP] Re: Function Call Line Number

2001-11-15 Thread Richard Lynch
Jason G. wrote: > Does anyone know of a way, that from within a function, you can determine > what line number and file the function was called on? Cannot be done with existing built-in PHP functions... Feel free to add that feature to the PHP source and contribute it :-) > I did try: > functi

[PHP] Re: Function Call Line Number

2001-11-14 Thread dav
Another thing... if the $lineno variable isn't defined yet, maybe the parser first try a cast into __LINE__ type, so even if the assign procedure is called at the function call, the line is evaluated at the funcion definition step... but maybe it's a bullship :-) J "Dav" <[EMAIL PROTECTED]> ha sc

[PHP] Re: Function Call Line Number

2001-11-14 Thread dav
Well, I don't know either but I was thinking about that... Usually this "$lineno = __LINE__" would be avaluated when the function is called, this mean it gives the __LINE__ of the function call itself. Why don't you try a more simple "include"/require instead of calling a funcion ?(see example) bu

[PHP] Re: Function Call Line Number

2001-11-13 Thread _lallous
I guess that is not possible with PHP yet. "Jason G." <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello, > > Does anyone know of a way, that from within a function, you can determine > what line number and file the function was called on? > > I did try: > f