3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php error_reporting(E_ALL);ini_set('display_errors', true);ini_set('html_errors', false);// Simple array:$array = array(1, 2);$count = count($array);for ($i = 0; $i < $count; $i++) {    echo "\nChecking $i: \n";    echo "Bad: " . $array['$i'] . "\n";    echo "Good: " . $array[$i] . "\n";    echo "Bad: {$array['$i']}\n";    echo "Good: {$array[$i]}\n";}
based on 5CUGU
Output for 4.3.0, 5.4.34 - 5.6.28, 7.0.0 - 7.1.0
Notice: Use of undefined constant  true - assumed ' true' in /in/KX7BL on line 2
Output for hhvm-3.12.0
Notice: Use of undefined constant  true - assumed ' true' in /in/KX7BL on line 2 Notice: Use of undefined constant  false - assumed ' false' in /in/KX7BL on line 2
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.5 - 5.0.5, 5.1.1 - 5.4.32
Notice: Use of undefined constant  true - assumed ' true' in /in/KX7BL on line 2 Warning: ini_set() has been disabled for security reasons in /in/KX7BL on line 2 Notice: Use of undefined constant  false - assumed ' false' in /in/KX7BL on line 2 Warning: ini_set() has been disabled for security reasons in /in/KX7BL on line 2
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/KX7BL on line 2
Process exited with code 255.
Output for 4.3.1 - 4.3.4
Notice: Use of undefined constant  true - assumed ' true' in /in/KX7BL on line 2 Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/KX7BL on line 2 Notice: Use of undefined constant  false - assumed ' false' in /in/KX7BL on line 2 Warning: ini_set,pcntl_fork() has been disabled for security reasons in /in/KX7BL on line 2