php-src/ext/reflection/tests/internal_static_property.phpt
Nikita Popov db7ead0768 Fix ReflectionProperty::get/setValue() on internal static property
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.
2018-06-28 22:45:26 +02:00

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)