php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70982 setStaticPropertyValue behaviors inconsistently with 5.6
Submitted: 2015-11-27 03:28 UTC Modified: -
From: laruence@php.net Assigned:
Status: Closed Package: Reflection related
PHP Version: 7.0.0RC8 OS:
Private report: No CVE-ID:
 [2015-11-27 03:28 UTC] laruence@php.net
Description:
------------
none

Test script:
---------------
<?php
class Foo {
    static $abc;
    function __construct()
    {
        var_dump(static::$abc);
    }
}

class Bar extends Foo {

}

$rf = new ReflectionClass('Bar');
$rf->setStaticPropertyValue('abc', 'hi');
$foo = $rf->newInstance();

Expected result:
----------------
string(2) "hi"

Actual result:
--------------
NULL

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-27 03:33 UTC] laruence@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6cb6c044992414fc8d985c0c24ca6f7a59d2706d
Log: Fixed bug #70982 (setStaticPropertyValue behaviors inconsistently with 5.6)
 [2015-11-27 03:33 UTC] laruence@php.net
-Status: Open +Status: Closed
 [2016-07-20 11:35 UTC] davey@php.net
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6cb6c044992414fc8d985c0c24ca6f7a59d2706d
Log: Fixed bug #70982 (setStaticPropertyValue behaviors inconsistently with 5.6)
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Tue Aug 29 15:01:52 2017 UTC