3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $testArray = array("monday", "December", "February 2014"); $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), "\n"; // echo date('r',$unixDate), "\n"; }
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
ci sono 3 valori monday Monday 00:00+0100 December Saturday 00:00+0100 February 2014 Saturday 00:00+0100
Output for 5.1.0 - 5.1.6
ci sono 3 valori monday Monday 00:00+0100 December Thursday 01:00+0100 February 2014 Saturday 00:00+0100
Output for 4.3.5 - 5.0.5
ci sono 3 valori monday Monday 00:00+0100 December Thursday 00:59+0100 February 2014 Friday 00:00+0100
Output for 4.3.0 - 4.3.4
ci sono 3 valori monday Monday 00:00+0100 December Thursday 00:59+0100 February 2014 Tuesday 00:00+0200