You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stdlib: ArrayObject::getIteratorClass() returns null after void setIteratorClass() in expression (ext/spl/spl_array.c) #10778
After $ao->setIteratorClass('ArrayIterator'), the next var_export($ao->getIteratorClass(), true) must be 'ArrayIterator'. On this compiler the first getIteratorClass() used as an expression after the void setter returns NULL (though a later call or direct echo may show the correct string).
Reproduces with declare(strict_types=1); see test/repro/maintainer_gap_arrayobject_get_iterator_class.php for the broader var_export sequence.
Likely VM return-value slot not cleared between void method and subsequent method call (ext/spl/ArrayObjectBuiltin.php early returnVar guard on setIteratorClass)
ext/spl/ArrayObjectBuiltin.php — do not bail out of setIteratorClass when returnVar is null before persisting class; void methods must not poison the next call's return slot
ext/spl/SplArrayStorage.php — iterator class bag already correct when setter runs
Fix:filterDeadVoidStatementMethodCallProducers drops dead void MethodCall preludes before sibling method inline call-args; setIteratorClass no longer returns early when returnVar is null.
Activity
PurHur commentedon Jun 23, 2026
claim: cursor-agent-lane-c — starting this run (ArrayObject getIteratorClass after void setIteratorClass; ext/spl/spl_array.c)
PurHur commentedon Jun 23, 2026
Merged via #10800
Fix:
filterDeadVoidStatementMethodCallProducersdrops dead voidMethodCallpreludes before sibling method inline call-args;setIteratorClassno longer returns early whenreturnVaris null.Verification:
Fix ArrayObject getIteratorClass() after void setIteratorClass() (#10778
Fix sibling MethodCall inline call-arg producer filter (#10816). (#10820
Fix sibling MethodCall inline call-arg wiring for typed returns (#10816…
Merge pull request #12687 from PurHur/agent/stdlib-ukey-arrayobject-b…
PurHur commentedon Jul 5, 2026
claim: cursor-agent-lane-a — regression fix: var_export after void setIteratorClass still misbinds getIteratorClass to true on master
PurHur commentedon Jul 5, 2026
Merged via #16310 — regression fix for
var_export(\$ao->getIteratorClass(), true)after voidsetIteratorClass().Verification:
vendor/bin/phpunit --filter "ArrayObjectGetIterator|arrayobject_getiterator|arrayobject_iterator_class"— OK (5 tests)php bin/vm.php test/repro/maintainer_gap_arrayobject_getiterator_after_set.php— prints'ArrayIterator'Compiler: fix var_export after void setIteratorClass misbind (#10778) (…