diff options
Diffstat (limited to 'Zend/tests/bug72177.phpt')
| -rw-r--r-- | Zend/tests/bug72177.phpt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Zend/tests/bug72177.phpt b/Zend/tests/bug72177.phpt new file mode 100644 index 0000000000..b5658d354a --- /dev/null +++ b/Zend/tests/bug72177.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug #72177 Scope issue in __destruct after ReflectionProperty::setValue() +--FILE-- +<?php +class Child +{ + protected $bar; + + public function __destruct() + { + $this->bar = null; + } +} + +class Parnt +{ + protected $child; + + public function doSomething() + { + $this->child = new Child(); + + $prop = new \ReflectionProperty($this, 'child'); + $prop->setAccessible(true); + $prop->setValue($this, null); + } +} + +$p = new Parnt(); +$p->doSomething(); + +echo "OK\n"; +?> +--EXPECT-- +OK |
