|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-04-22 22:54 UTC] nikic@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: nikic
[2016-04-22 22:54 UTC] nikic@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 07:00:01 2025 UTC |
Description: ------------ For classes with implemented __get and __isset, __get is automatically called when testing only if chained overloaded properties are set, despite the first property in chain doesn't exist. There is no reason to call __get anymore. It's there from the beginning of __get/__isset, So maybe it's feature, but undocumented? Test script: --------------- class Xstd {} class XOverloading { function __isset($name) { return FALSE; } function __get($name) { trigger_error('Error', E_USER_WARNING); } } $obj = new Xstd(); var_dump(isset($obj->prop1->prop2)); $obj = new XOverloading(); var_dump(isset($obj->prop1->prop2)); Expected result: ---------------- bool(false) bool(false) Actual result: -------------- bool(false) Warning: Error in .... on line 13 bool(false)