Re: Function Call Line Number

From: Date: Wed, 14 Nov 2001 07:50:40 +0000
Subject: Re: Function Call Line Number
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74549@lists.php.net to get a copy of this message
I guess that is not possible with PHP yet. "Jason G." <blair@nb.net> wrote in message news:5.1.0.14.0.20011114015822.02d3ec88@pop3.nb.net... > 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: > function myfunc($lineno = __LINE__) > { > echo $lineno; > } > but this just outputted the very line that __LINE__ resides on. > > This would be very helpful in displaying sensible error messages, like the > native php functions do. > > Thanks, > > -Jason Garber > IonZoft.com >

« previous php.general (#74549) next »