mirror of
https://github.com/php/php-src.git
synced 2024-09-22 10:27:25 +00:00
db7ead0768
This was broken by 6dc0cd868d
, which
moved static property initialization outside of constant updating.
Instead of replicating logic, use zend_get_static_property() API
in the reflection implementation, just like we're using
read_property for non-static proprety access.
17 lines
319 B
PHP
17 lines
319 B
PHP
--TEST--
|
|
ReflectionProperty::get/setValue() on internal static property
|
|
--SKIPIF--
|
|
<?php
|
|
if (!class_exists('_ZendTestClass')) die('skip zend_test extension required');
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$rp = new ReflectionProperty('_ZendTestClass', '_StaticProp');
|
|
$rp->setValue(42);
|
|
var_dump($rp->getValue());
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(42)
|