3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(new stdClass()); $a[0]->state = true; $b = array_values($a); $b[0]->state = false; var_dump($a, $b);
based on bk5nC
Output for 5.3.23 - 7.2.6
array(1) { [0]=> object(stdClass)#1 (1) { ["state"]=> bool(false) } } array(1) { [0]=> object(stdClass)#1 (1) { ["state"]=> bool(false) } }