php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #49923 get_defined_constants() BC break
Submitted: 2009-10-19 16:44 UTC Modified: 2009-11-25 10:10 UTC
From: philip@php.net Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.3SVN-2009-10-19 (snap) OS: Mac OS X 10.6
Private report: No CVE-ID: None
 [2009-10-19 16:44 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-11 14:26 UTC] jani@php.net
It's out already -> document it.
 [2009-11-25 10:10 UTC] svn@php.net
Automatic comment from SVN on behalf of vrana
Revision: http://svn.php.net/viewvc/?view=revision&revision=291297
Log: Core constants (bug #49923)
 [2009-11-25 10:10 UTC] vrana@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 [2009-12-15 03:58 UTC] svn@php.net
Automatic comment from SVN on behalf of philip
Revision: http://svn.php.net/viewvc/?view=revision&revision=292149
Log: The documented BC break happened in 5.3.0, not 5.2.9. Deals with bug #49923
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 05:01:34 2025 UTC