Bug #60099 [Com]: __halt_compiler() works in braced namespaces
| From: | nikic@php.net | Date: | Thu, 20 Oct 2011 05:21:37 +0000 |
| Subject: | Bug #60099 [Com]: __halt_compiler() works in braced namespaces | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164459@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60099&edit=1
ID: 60099
Comment by: nikic@php.net
Reported by: nikic@php.net
Summary: __halt_compiler() works in braced namespaces
Status: Bogus
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.4.0beta1
Block user comment: N
Private report: N
New Comment:
__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();
Previous Comments:
------------------------------------------------------------------------
[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