3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $vars=array( '^hello', 123, false, 1.23, ); foreach($vars as $var) { echo $var, ' => ', ($var[0]=='^') ? substr($var,1) : 'false', PHP_EOL; }
Output for 4.3.10 - 4.4.9, 5.0.2 - 7.1.0
^hello => hello 123 => false => false 1.23 => false
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
^hello => hello Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/vIr4J on line 12 PHP_EOL123 => false Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/vIr4J on line 12 PHP_EOL => false Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/vIr4J on line 12 PHP_EOL1.23 => false Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/vIr4J on line 12 PHP_EOL