3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $testArray = array(-1, 0, 1, December, February 2014, "now"); $unixArray = array(); for($i = 0, $size = count($testArray); $i < $size; ++$i) { $testDate = $testArray[$i]; $unixArray[$i] = strtotime($testDate); } for($i = 0, $size = count($unixArray); $i < $size; ++$i) { $unixDate = $unixArray[$i]; echo $testDate, "\n"; // echo $unixDate, "\n"; echo date('l H\:iO',$unixDate), "\n"; // echo date('r',$unixDate), "\n"; echo "\n"; }
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected '2014' (T_LNUMBER), expecting ')' in /in/5WldW on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_LNUMBER, expecting ')' in /in/5WldW on line 2
Process exited with code 255.