3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array('test_1' => 1, 'test_2' => 1, 'test_3' => 1); $array['bla']++; $array['bli'] = $array['bli'] + 1; $array['blo'] = $array['blo']++; var_dump($array);
based on 7ELcW
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined index: bla in /in/cfrUd on line 4 Notice: Undefined index: bli in /in/cfrUd on line 5 Notice: Undefined index: blo in /in/cfrUd on line 6 array(6) { ["test_1"]=> int(1) ["test_2"]=> int(1) ["test_3"]=> int(1) ["bla"]=> int(1) ["bli"]=> int(1) ["blo"]=> NULL }
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: bli in /in/cfrUd on line 5 array(6) { ["test_1"]=> int(1) ["test_2"]=> int(1) ["test_3"]=> int(1) ["bla"]=> int(1) ["bli"]=> int(1) ["blo"]=> NULL }
Output for 4.3.0 - 5.2.17
Notice: Undefined index: bla in /in/cfrUd on line 4 Notice: Undefined index: bli in /in/cfrUd on line 5 Notice: Undefined index: blo in /in/cfrUd on line 6 array(6) { ["test_1"]=> int(1) ["test_2"]=> int(1) ["test_3"]=> int(1) ["bla"]=> int(1) ["bli"]=> int(1) ["blo"]=> NULL }