#42541 [Asn->Csd]: Check for namespace decl. on first line doesn't work when extended info is on

From: Date: Wed, 05 Sep 2007 07:25:07 +0000
Subject: #42541 [Asn->Csd]: Check for namespace decl. on first line doesn't work when extended info is on
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-117144@lists.php.net to get a copy of this message
ID: 42541 Updated by: dmitry@php.net Reported By: derick@php.net -Status: Assigned +Status: Closed Bug Type: Scripting Engine problem Operating System: Linux PHP Version: 6CVS-2007-09-04 (CVS) Assigned To: dmitry New Comment: This bug has been fixed in CVS. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2007-09-04 10:00:58] derick@php.net Dmitry, could you please check this? ------------------------------------------------------------------------ [2007-09-04 10:00:42] derick@php.net Description: ------------ When extended info is enabled (to generate EXT_* opcodes for debuggers), the namespace decl. on the first line check is not correct (zend_compile.c:5049) Reproduce code: --------------- Just any file with a namespace decl, for example: Zend/tests/ns_010.php Run as: php -n -e /home/derick/dev/php/php-6.0dev/Zend/tests/ns_010.php Expected result: ---------------- class ok class ok class ok class ok method ok method ok method ok method ok const ok const ok const ok const ok var ok var ok var ok var ok Actual result: -------------- Fatal error: Namespace declaration statement has to be the very first statement in the script in /home/derick/dev/php/php-6.0dev/Zend/tests/ns_010.php on line 2 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42541&edit=1

« previous php.bugs (#117144) next »