Bug #60099 [Opn->Csd]: __halt_compiler() works in braced namespaces
Edit report at https://bugs.php.net/bug.php?id=60099&edit=1
ID: 60099
Updated by: felipe@php.net
Reported by: nikic@php.net
Summary: __halt_compiler() works in braced namespaces
-Status: Open
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.4.0beta1
-Assigned To:
+Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
This bug has been fixed in SVN.
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/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2011-10-20 05:21:37] nikic@php.net
__halt_compiler is supposed to work only in outermost scope. For example this would not work:
<?php
if ('a') { // or if(): or do { or switch() { or ...
__halt_compiler();
------------------------------------------------------------------------
[2011-10-19 22:59:29] felipe@php.net
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
why not? __halt_compiler() abort the parsing.
------------------------------------------------------------------------
[2011-10-19 19:22:03] nikic@php.net
Description:
------------
<?php
namespace A {
__halt_compiler();
The above code will work, but I assume that it should not.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60099&edit=1
Thread (5 messages)