[PHP] Caller's __LINE__

2001-02-28 Thread elias
Hello. I want to make a small function that sends a debug message: function debuginfo($msg) { echo"the message is $msg, at line" . __LINE__ . " "; } in my code: line 1 line 2 line x: debuginfo("hello!!!"); is there is anyway to show the caller's line number? in this case 'x' ? --

Re: [PHP] Caller's __LINE__

2001-02-28 Thread Joao Prado Maia
On Wed, 28 Feb 2001, Christian Dechery wrote: > > >Pass __LINE__ to the function as one of its arguments: > > > > function debuginfo($msg, __LINE__) > > { > >echo"the message is $msg, at line" . __LINE__ . " "; > > } > > that won't work since __LINE__ returns the exact line where it's u

Re: [PHP] Caller's __LINE__

2001-02-28 Thread Christian Dechery
>Pass __LINE__ to the function as one of its arguments: > > function debuginfo($msg, __LINE__) > { >echo"the message is $msg, at line" . __LINE__ . " "; > } that won't work since __LINE__ returns the exact line where it's used... so it will always show the line of the function header..

RE: [PHP] Caller's __LINE__

2001-02-28 Thread Neil Kimber
- From: CC Zona [mailto:[EMAIL PROTECTED]] Sent: 28 February 2001 09:37 To: [EMAIL PROTECTED] Subject: Re: [PHP] Caller's __LINE__ In article <97ifmk$p85$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("elias") wrote: > function debuginfo($msg) > { > echo"the m

Re: [PHP] Caller's __LINE__

2001-02-28 Thread CC Zona
In article <97ifmk$p85$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("elias") wrote: > function debuginfo($msg) > { > echo"the message is $msg, at line" . __LINE__ . " "; > } > > in my code: > line 1 > line 2 > line x: debuginfo("hello!!!"); > > is there is anyway to show the caller's line n

[PHP] Caller's __LINE__

2001-02-28 Thread elias
Hello. I want to make a small function that sends a debug message: function debuginfo($msg) { echo"the message is $msg, at line" . __LINE__ . " "; } in my code: line 1 line 2 line x: debuginfo("hello!!!"); is there is anyway to show the caller's line number? in this case 'x' ? --