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

From: Date: Tue, 04 Sep 2007 10:00:42 +0000
Subject: #42541 [NEW]: Check for namespace decl. on first line doesn't work when extended info is on
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-117084@lists.php.net to get a copy of this message
From: derick@php.net Operating system: Linux PHP version: 6CVS-2007-09-04 (CVS) PHP Bug Type: Scripting Engine problem Bug description: Check for namespace decl. on first line doesn't work when extended info is on 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 bug report at http://bugs.php.net/?id=42541&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42541&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42541&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42541&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42541&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42541&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42541&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42541&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42541&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42541&r=support Expected behavior: http://bugs.php.net/fix.php?id=42541&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42541&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42541&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42541&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42541&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42541&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42541&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42541&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42541&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42541&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42541&r=mysqlcfg

« previous php.bugs (#117084) next »