3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $testArray = array("today"); $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 $testArray[$i], " - "; echo $unixDate, " - "; // echo date('l H\:iO',$unixDate), " - "; echo date('r',$unixDate), " - "; echo "\n"; }
Output for 5.0.0 - 5.0.2, 5.1.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
ci sono 1 valori today - 1387580400 - Sat, 21 Dec 2013 00:00:00 +0100 -
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.0.5
ci sono 1 valori today - 1387643061 - Sat, 21 Dec 2013 17:24:21 +0100 -