#49923 [Opn->Tbd]: get_defined_constants() BC break

From: Date: Wed, 11 Nov 2009 14:26:45 +0000
Subject: #49923 [Opn->Tbd]: get_defined_constants() BC break
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-3091@lists.php.net to get a copy of this message
ID: 49923 Updated by: jani@php.net Reported By: philip@php.net -Status: Open +Status: To be documented -Bug Type: Scripting Engine problem +Bug Type: Documentation problem Operating System: Mac OS X 10.6 PHP Version: 5.3SVN-2009-10-19 (snap) New Comment: It's out already -> document it. Previous Comments: ------------------------------------------------------------------------ [2009-10-19 16:44:00] philip@php.net Description: ------------ I expected 'internal' and not 'Core' to be the index for internal core constants. This apparently changed in PHP 5.3.0, yet is not in NEWS or documented. Please clarify the situation, as this may have been an unintentional change and BC break. Related: PHP bug #49223 Reproduce code: --------------- <?php $constants = get_defined_constants(true); if (isset($constants['Core'])) { echo 'Key "Core" exists, PHP version: ' . PHP_VERSION; } if (isset($constants['internal'])) { echo 'Key "internal" exists, PHP version: ' . PHP_VERSION; } Expected result: ---------------- Key "internal" exists, PHP version: 5.3.2-dev Key "internal" exists, PHP version: 5.2.8 Actual result: -------------- Key "Core" exists, PHP version: 5.3.2-dev Key "internal" exists, PHP version: 5.2.8 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49923&edit=1

« previous php.doc.bugs (#3091) next »