3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a= array(1 => 'jabko', 2 => 'hruska'); $b=$a; var_dump($a); var_dump($b); unset($a[1]); echo '---'; var_dump($a); var_dump($b);
Output for 4.3.0 - 7.1.0
array(2) { [1]=> string(5) "jabko" [2]=> string(6) "hruska" } array(2) { [1]=> string(5) "jabko" [2]=> string(6) "hruska" } ---array(1) { [2]=> string(6) "hruska" } array(2) { [1]=> string(5) "jabko" [2]=> string(6) "hruska" }