3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $testArray = array("2013-12-21 17:34:01", "today", "21/12", "21-12" "21 12 2013", "21/12/2013", "21/12/13", "12/2013", "12-2013", "august"); $unixArray = array(); for($i = 0, $size = count($testArray); $i < $size; ++$i) { $testDate = $testArray[$i]; $unixArray[$i] = strtotime($testDate); } echo "ci sono ", count($unixArray); echo " valori \n" ; for($i = 0, $size = count($unixArray); $i < $size; ++$i) { $unixDate = $unixArray[$i]; echo $unixDate, " - "; // echo date('l H\:iO',$unixDate), " - "; echo date('r',$unixDate), " - "; echo $testArray[$i], " - "; echo "\n"; }
Output for 5.4.0 - 5.4.23
Parse error: syntax error, unexpected '"21 12 2013"' (T_CONSTANT_ENCAPSED_STRING), expecting ')' in /in/lgQ4D on line 2
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /in/lgQ4D on line 2
Process exited with code 255.