3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a['lol'] = 'fuu' or '0'; print_r($a); $a = array('lol' => a*2 or '1'); print_r($a);
Output for 7.2.0 - 7.2.6
Array ( [lol] => fuu ) Warning: Use of undefined constant a - assumed 'a' (this will throw an Error in a future version of PHP) in /in/RE865 on line 7 Warning: A non-numeric value encountered in /in/RE865 on line 7 Array ( [lol] => 1 )
Output for 7.1.0 - 7.1.20
Array ( [lol] => fuu ) Notice: Use of undefined constant a - assumed 'a' in /in/RE865 on line 7 Warning: A non-numeric value encountered in /in/RE865 on line 7 Array ( [lol] => 1 )
Output for 4.3.0 - 7.0.20
Array ( [lol] => fuu ) Notice: Use of undefined constant a - assumed 'a' in /in/RE865 on line 7 Array ( [lol] => 1 )