Bug #70982 [Opn->Csd]: setStaticPropertyValue behaviors inconsistently with 5.6
| From: | laruence@php.net | Date: | Fri, 27 Nov 2015 03:33:15 +0000 |
| Subject: | Bug #70982 [Opn->Csd]: setStaticPropertyValue behaviors inconsistently with 5.6 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-197450@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70982&edit=1
ID: 70982
Updated by: laruence@php.net
Reported by: laruence@php.net
Summary: setStaticPropertyValue behaviors inconsistently with
5.6
-Status: Open
+Status: Closed
Type: Bug
Package: Reflection related
PHP Version: 7.0.0RC8
Block user comment: N
Private report: N
New Comment:
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)
Previous Comments:
------------------------------------------------------------------------
[2015-11-27 03:28:57] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70982&edit=1