3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $line = array(a,b,c); for ( $i = 0; $i < 1; $line[$i++] = 0 ) var_dump($line);
based on DOH9K
Output for 7.2.0
Warning: Use of undefined constant a - assumed 'a' (this will throw an Error in a future version of PHP) in /in/5JaBo on line 2 Warning: Use of undefined constant b - assumed 'b' (this will throw an Error in a future version of PHP) in /in/5JaBo on line 2 Warning: Use of undefined constant c - assumed 'c' (this will throw an Error in a future version of PHP) in /in/5JaBo on line 2 array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" }
Output for 5.3.18 - 7.1.10
Notice: Use of undefined constant a - assumed 'a' in /in/5JaBo on line 2 Notice: Use of undefined constant b - assumed 'b' in /in/5JaBo on line 2 Notice: Use of undefined constant c - assumed 'c' in /in/5JaBo on line 2 array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" }