|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-12-10 09:11 UTC] laruence@php.net
-Assigned To:
+Assigned To: dmitry
[2013-12-10 09:11 UTC] laruence@php.net
[2013-12-10 10:15 UTC] Terry at ellisons dot org dot uk
[2013-12-10 11:45 UTC] dmitry@php.net
[2013-12-10 13:08 UTC] dmitry@php.net
[2013-12-10 13:08 UTC] dmitry@php.net
-Status: Assigned
+Status: Closed
[2013-12-10 18:47 UTC] ab@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 07:00:01 2025 UTC |
Description: ------------ The B/C behaviour is to bind constants at execution of the DEFINE_CONSTANT opcode. The 5.6 optimizer now attempts to evaluate them at compile time, which changes the execution behaviour. Test script: --------------- --TEST-- Terry_001 Constants get statically bound at compile time when Optimized --INI-- opcache.enable=1 opcache.enable_cli=1 opcache.optimization_level=-1 --SKIPIF-- <?php if (!extension_loaded('Zend OPcache') || php_sapi_name() != "cli") die("skip CLI only"); ?> --FILE-- <?php printf ("A=%s\n", getA()); const A="hello"; function getA() {return A;} --CLEAN-- --EXPECTF-- Notice: Use of undefined constant A - assumed 'A' in %son line %d A=A