3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $arr1 = array(2, 3); $arr4 = (array)$arr1; $arr1[] = 4; var_dump($arr1); var_dump($arr4);
based on 9t18g
Output for 4.3.0 - 7.2.6
array(3) { [0]=> int(2) [1]=> int(3) [2]=> int(4) } array(2) { [0]=> int(2) [1]=> int(3) }