|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-12-20 16:31 UTC] tony2001@php.net
[2007-02-07 06:29 UTC] cellog@php.net
[2007-05-24 16:04 UTC] francois at tekwire dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 19:00:02 2025 UTC |
Description: ------------ When __halt_compiler() is seen for the second time, PHP displays a message saying: Notice: Constant __COMPILER_HALT_OFFSET__ already defined in ... Although it cannot happen in a single file, it can happen when including two files containing an __halt_compiler() directive. The constant should be undefined before calling REGISTER_MAIN_LONG_CONSTANT("__C OMPILER_HALT_OFFSET__", zend_get_scanned_file_offset(TSRMLS_C), CONST_CS) in zend_language_parser.y but I haven't found any function to undefine a constant... Reproduce code: --------------- * File a.php contains : <?php include 'b.php'; include 'c.php'; * File b.php and c.php both contain : <?php echo __FILE__."\n"; __halt_compiler(); data * Run a.php Expected result: ---------------- /depot/divers/flp/tmp/b.php /depot/divers/flp/tmp/c.php Actual result: -------------- /depot/divers/flp/tmp/b.php Notice: Constant __COMPILER_HALT_OFFSET__ already defined in /depot/divers/flp/tmp/c.php on line 3 /depot/divers/flp/tmp/c.php