3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array('hello', 'NO'); var_dump('Start A', $a); $b = $a; var_dump('Start B', $b); $b[] = ':O'; var_dump('End B', $b); var_dump('End A', $a);
based on UW0NT
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
string(7) "Start A" array(2) { [0]=> string(5) "hello" [1]=> string(2) "NO" } string(7) "Start B" array(2) { [0]=> string(5) "hello" [1]=> string(2) "NO" } string(5) "End B" array(3) { [0]=> string(5) "hello" [1]=> string(2) "NO" [2]=> string(2) ":O" } string(5) "End A" array(2) { [0]=> string(5) "hello" [1]=> string(2) "NO" }