#20035 [Opn->Bgs]: __LINE__ miscounts with #!/path/php scripts

From: Date: Wed, 23 Oct 2002 00:39:04 +0000
Subject: #20035 [Opn->Bgs]: __LINE__ miscounts with #!/path/php scripts
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-23080@lists.php.net to get a copy of this message
ID: 20035 Updated by: iliaa@php.net Reported By: befletch@yahoo.com -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: OpenBSD 3.1 PHP Version: 4.2.3 New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2002-10-22 19:34:54] befletch@yahoo.com The built-in variable __LINE__ undercounts by 1 on command-line scripts that begin with a #!path-to-php line. For example: #!/usr/local/bin/php -q <?php echo "Line 3 reports ".__LINE__."\n"; ?> This script will output: Line 3 reports 2 This issue also applies to (at least) some other 4.1+ releases. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20035&edit=1

« previous php.bugs (#23080) next »