3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $arr = ['a','1','test','0','0type', 123, 6.45]; foreach ($arr as $val) { echo '$val = ' . var_export($val, false) . '; !$val = ' . !$val . "\n"; }
based on mO4Zr
Output for 5.4.0 - 5.4.21, 5.5.0 - 5.5.5, 7.1.0
'a'$val = ; !$val = '1'$val = ; !$val = 'test'$val = ; !$val = '0'$val = ; !$val = 1 '0type'$val = ; !$val = 123$val = ; !$val = 6.45$val = ; !$val =
Output for 5.6.28, 7.0.14
'a'$val = ; !$val = '1'$val = ; !$val = 'test'$val = ; !$val = '0'$val = ; !$val = 1 '0type'$val = ; !$val = 123$val = ; !$val = 6.4500000000000002$val = ; !$val =
Output for 5.4.22 - 5.4.45, 5.5.6 - 5.6.25, 7.0.0 - 7.0.10
'a'$val = ; !$val = '1'$val = ; !$val = 'test'$val = ; !$val = '0'$val = ; !$val = 1 '0type'$val = ; !$val = 123$val = ; !$val = 6.45000000000000017763568$val = ; !$val =
Output for hhvm-3.10.0 - 3.12.0
'a'$val = 1; !$val = '1'$val = 1; !$val = 'test'$val = 1; !$val = '0'$val = 1; !$val = 1 '0type'$val = 1; !$val = 123$val = 1; !$val = 6.45$val = 1; !$val =
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/u5Ja8 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[' in /in/u5Ja8 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error in /in/u5Ja8 on line 3
Process exited with code 255.