3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [ 'pole1' => 'ass', 'pole2' => 'as', 'pole3' => 'dupa' ]; foreach($a as $item) { console.log($item); }
Output for 7.2.0 - 7.3.0alpha1
Warning: Use of undefined constant console - assumed 'console' (this will throw an Error in a future version of PHP) in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be float, string given in /in/X7lkL on line 10 Warning: Use of undefined constant console - assumed 'console' (this will throw an Error in a future version of PHP) in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be float, string given in /in/X7lkL on line 10 Warning: Use of undefined constant console - assumed 'console' (this will throw an Error in a future version of PHP) in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be float, string given in /in/X7lkL on line 10
Output for 7.0.0 - 7.1.10
Notice: Use of undefined constant console - assumed 'console' in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be float, string given in /in/X7lkL on line 10 Notice: Use of undefined constant console - assumed 'console' in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be float, string given in /in/X7lkL on line 10 Notice: Use of undefined constant console - assumed 'console' in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be float, string given in /in/X7lkL on line 10
Output for 5.4.0 - 5.6.28
Notice: Use of undefined constant console - assumed 'console' in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be double, string given in /in/X7lkL on line 10 Notice: Use of undefined constant console - assumed 'console' in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be double, string given in /in/X7lkL on line 10 Notice: Use of undefined constant console - assumed 'console' in /in/X7lkL on line 10 Warning: log() expects parameter 1 to be double, string given in /in/X7lkL on line 10
Output for 5.3.19 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/X7lkL on line 3
Process exited with code 255.