Edit report at https://bugs.php.net/bug.php?id=60099&edit=1

 ID:                 60099
 Comment by:         ni...@php.net
 Reported by:        ni...@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] fel...@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] ni...@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

Reply via email to