php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60099 __halt_compiler() works in braced namespaces
Submitted: 2011-10-19 19:22 UTC Modified: 2011-11-16 17:39 UTC
From: nikic@php.net Assigned: felipe
Status: Closed Package: Scripting Engine problem
PHP Version: 5.4.0beta1 OS:
Private report: No CVE-ID:
 [2011-10-19 19:22 UTC] nikic@php.net
Description:
------------
<?php
namespace A {
    __halt_compiler();

The above code will work, but I assume that it should not.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-19 22:59 UTC] 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 22:59 UTC] felipe@php.net
-Status: Open +Status: Bogus
 [2011-10-20 05:21 UTC] 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-28 18:38 UTC] nikic@php.net
-Status: Bogus +Status: Open
 [2011-11-16 17:39 UTC] felipe@php.net
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.


 [2011-11-16 17:39 UTC] felipe@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: felipe
 [2011-11-16 17:41 UTC] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=319353
Log: - Fixed bug #60099 (__halt_compiler() works in braced namespaces)
 [2012-04-18 09:47 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=caa863dc42fcae9aa7efb29ed980dc4da87d1f14
Log: - Fixed bug #60099 (__halt_compiler() works in braced namespaces)
 [2012-07-24 23:38 UTC] rasmus@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=caa863dc42fcae9aa7efb29ed980dc4da87d1f14
Log: - Fixed bug #60099 (__halt_compiler() works in braced namespaces)
 [2013-11-17 09:35 UTC] laruence@php.net
Automatic comment on behalf of felipe
Revision: http://git.php.net/?p=php-src.git;a=commit;h=caa863dc42fcae9aa7efb29ed980dc4da87d1f14
Log: - Fixed bug #60099 (__halt_compiler() works in braced namespaces)
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Fri Apr 18 00:01:21 2014 UTC