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: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: laruence@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 16:01:33 2024 UTC