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
GH-11178 (Segmentation fault in spl_array_it_get_current_data (PHP 8.1.18))
--FILE--
<?php
#[AllowDynamicProperties]
class A implements IteratorAggregate {
function__construct() {
$this->{'x'} = 1;
}
functiongetIterator(): Traversable {
returnnewArrayIterator($this);
}
}
$obj = newA;
foreach ($objas$k => &$v) {
$v = 3;
}
var_dump($obj);
?>
--EXPECTF--
Deprecated: ArrayIterator::__construct(): Using an object as a backing array for ArrayIterator is deprecated, as it allows violating class constraints and invariants in %s on line %d