|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2016-05-07 18:25 UTC] ocramius at gmail dot com
  [2016-05-07 18:27 UTC] ocramius at gmail dot com
  [2016-05-07 18:48 UTC] ocramius at gmail dot com
  [2016-05-07 18:59 UTC] nikic@php.net
  [2016-05-07 19:00 UTC] ocramius at gmail dot com
  [2016-05-10 10:18 UTC] nikic@php.net
  [2016-05-10 10:18 UTC] nikic@php.net
 
-Status: Open
+Status: Closed
  [2016-05-10 14:14 UTC] ocramius at gmail dot com
  [2016-05-12 11:33 UTC] mbeccati@php.net
 
-Assigned To:
+Assigned To: mbeccati
  [2016-05-12 11:33 UTC] mbeccati@php.net
  [2016-05-12 11:34 UTC] mbeccati@php.net
 
-Assigned To: mbeccati
+Assigned To: nikic
  [2016-05-12 15:12 UTC] ocramius at gmail dot com
  [2016-05-12 15:25 UTC] ocramius at gmail dot com
  [2016-05-12 15:39 UTC] ocramius at gmail dot com
  [2016-05-12 15:40 UTC] ocramius at gmail dot com
  [2016-07-20 11:31 UTC] davey@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 18:00:01 2025 UTC | 
Description: ------------ When using `ReflectionProperty#getValue($object)` on a `$object` with an `unset()` property and defined `__isset` and `__get` methods, the `__get` method is called, while it should only use `__get`. Note that this is a bug that affects only PHP 7.0.6, and isn't part of 7.0.5. Test script: --------------- <?php class Foo { private $bar; public function __construct() { unset($this->bar); } public function __isset($name) { var_dump(__METHOD__); return true; } public function __get($name) { var_dump(__METHOD__); return $name; } } $instance = new Foo(); $reflectionBar = (new ReflectionProperty(Foo::class, 'bar')); $reflectionBar->setAccessible(true); $closureBar = (function (Foo $instance) { return $instance->bar; })->bindTo(null, Foo::class); var_dump($reflectionBar->getValue($instance)); var_dump($closureBar($instance)); Expected result: ---------------- string(10) "Foo::__get" string(3) "bar" string(10) "Foo::__get" string(3) "bar" Actual result: -------------- string(12) "Foo::__isset" string(10) "Foo::__get" string(3) "bar" string(10) "Foo::__get" string(3) "bar"