|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-09-07 19:52 UTC] cataphract@php.net
-Status: Open
+Status: Bogus
[2010-09-07 19:52 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 06:00:02 2025 UTC |
Description: ------------ If i use expression like $a = $b = $c = $d; where $b or $c determined as class extends ArrayObject, then ArrayObject::offsetGet method do not call. It may be only if above expression interpreted as $a = $d; $b = $d; $c = $d; Test script: --------------- class foo extends ArrayObject{ function offsetGet($index){return 'Ok';} } $o = new foo(); $a = $o[1]; $b = ($o[1] = 'Fail'); echo $a,$b; //Output: OkFail //but if $o[1] = 'Fail'; $b = $o[1]; echo $a,$b; //Output: OkOk