3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $testArray = array("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',strtotime($testDate)), "\n"; echo date('r',strtotime($testDate)), "\n"; echo "\n"; }
Output for 4.3.0 - 4.4.9, 5.0.3 - 7.1.0
now 1387640726 Saturday 16:45+0100 Sat, 21 Dec 2013 16:45:26 +0100
Output for 5.0.0 - 5.0.2
now 1387580400 Saturday 00:00+0100 Sat, 21 Dec 2013 00:00:00 +0100