Bug #60099 [Bgs->Opn]: __halt_compiler() works in braced namespaces

From: Date: Fri, 28 Oct 2011 18:38:48 +0000
Subject: Bug #60099 [Bgs->Opn]: __halt_compiler() works in braced namespaces
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-164648@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 Updated by: nikic@php.net Reported by: nikic@php.net Summary: __halt_compiler() works in braced namespaces -Status: Bogus +Status: Open Type: Bug Package: Scripting Engine problem PHP Version: 5.4.0beta1 Block user comment: N Private report: N 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

« previous php.bugs (#164648) next »