|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-06 04:52 UTC] gopalv82 at yahoo dot com
[2006-11-06 05:20 UTC] arnaud dot lb at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 13:00:01 2025 UTC |
Description: ------------ Constants loaded with apc_load_constants are not shown in get_defined_constants Reproduce code: --------------- <?php $constants = array( 'ONE' => 1, 'TWO' => 2, 'THREE' => 3, ); apc_define_constants('numbers', $constants); apc_load_constants('numbers'); echo ONE, TWO, THREE; echo "is 'ONE' defined ? " . (int) defined('ONE'); $constants = get_defined_constants(true); echo "Defined constants: " . count($constants['user']) . "\n"; print_r($constants['user']); ?> Expected result: ---------------- 123 is 'ONE' defined ? 1 Defined constants: 3 Array ( [ONE] => 1 [TWO] => 2 [THREE] => 3 ) Actual result: -------------- 123 is 'ONE' defined ? 1 Defined constants: 0 (print_r prints nothing here)