3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('test_1' => 1, 'test_2' => 1, 'test_3' => 1); $array['test_1']++; $array['test_2'] = $array['test_2'] + 1; $array['test_3'] = $array['test_3']++; var_dump($array);
based on cfrUd
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(3) { ["test_1"]=> int(2) ["test_2"]=> int(2) ["test_3"]=> int(1) }