Bug #15523 Updated: Line Number

From: Date: Tue, 12 Feb 2002 15:47:52 +0000
Subject: Bug #15523 Updated: Line Number
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-193@lists.php.net to get a copy of this message
ID: 15523 Updated by: jan@php.net Reported By: blanke@ddd.de Status: Bogus Bug Type: Feature/Change Request Operating System: Linux PHP Version: 4.1.1 New Comment: what about function foo($line) { echo 'the function was called in line: '.$line } foo(__LINE__); ? Previous Comments: ------------------------------------------------------------------------ [2002-02-12 10:45:32] blanke@ddd.de Hi there! That's correct, that __LINE__ contains the !current! Line-Number. But I what to know from which line a function has been called. > > > > 1 function blah() > > 2 { > > 3 echo("Function blah has been called from line 6"); > > 4 } > > 5 > > 6 blah(); > > In line 3, i don't want to know the CURRENT line Number. I'd like to know the Line-Number from which that Function has been called. mfg, Nico Blanke. ------------------------------------------------------------------------ [2002-02-12 10:40:45] jan@php.net in fact it is bogus ;) ------------------------------------------------------------------------ [2002-02-12 10:39:21] mj@php.net The constant __LINE__ contains the current line number. ------------------------------------------------------------------------ [2002-02-12 10:24:47] blanke@ddd.de Hi there ! I think it would be great if it would be possible to find out from which line of a script a function has been called. example 1 function blah() 2 { 3 echo("Function blah has been called from line 6"); 4 } 5 6 blah(); ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15523&edit=1

« previous php.bugs (#193) next »