3v4l.org

run code in 300+ PHP versions simultaneously
<?php $year = 2012; $months = array(01,02,03,04,05,06,07,08,09,10,11,12); $days = array(01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30); foreach($months AS $month) foreach($days AS $day) if((int)$year && (int)$month && (int)$day && rand(0,100)>15) $datesWS[] = new DateTime(implode('-',array($year,$month,$day))); usort($datesWS, function ($a, $b){ return $a == $b ? 0 : $a > $b ? 1 : -1; }); $dateIni = count($datesWS)>0 ? reset($datesWS) : 0; $dateIni = $dateIni->modify( '-1 day' ); $dateEnd = count($datesWS)>0 ? end($datesWS) : 0; $dateEnd = $dateEnd->modify( '+1 day' ); $interval = new DateInterval('P1D'); $datesRange = iterator_to_array(new DatePeriod($dateIni, $interval, $dateEnd)); // Get excluded dates $excludeDates = array_udiff($datesRange, $datesWS, function ($a, $b) { return $a == $b ? 0 : 1; }); var_dump($excludeDates); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.2.100.1500.00614.41
7.2.90.1790.01214.24
7.2.80.0170.00014.30
7.2.70.1790.01614.58
7.2.60.0090.00614.79
7.2.50.0100.00714.50
7.2.40.1520.00614.70
7.2.30.0980.00014.83
7.2.20.1650.01014.61
7.2.10.2070.00614.68
7.2.00.1160.01014.84
7.1.220.0090.00513.65
7.1.210.0140.00513.61
7.1.200.0080.00413.61
7.1.190.1170.00613.61
7.1.180.0150.00613.61
7.1.170.1620.00013.61
7.1.160.0120.00913.61
7.1.150.1590.00013.61
7.1.140.2150.01213.61
7.1.130.1750.00713.61
7.1.120.1320.00313.61
7.1.110.1340.00613.76
7.1.100.1320.00713.77
7.1.90.2270.01613.76
7.1.80.1860.00713.61
7.1.70.2080.00713.61
7.1.60.2510.00731.78
7.1.50.2100.00331.66
7.1.40.1940.01031.77
7.1.30.0530.00731.48
7.1.20.0270.00731.39
7.1.10.0180.00313.61
7.1.00.0060.00613.64
7.0.310.0110.00313.61
7.0.300.1790.01213.61
7.0.290.0160.00913.61
7.0.280.0100.00313.61
7.0.270.1530.00313.61
7.0.260.1230.01013.61
7.0.250.1850.00713.61
7.0.240.1290.00913.61
7.0.230.1740.00313.61
7.0.220.1710.00313.61
7.0.210.2200.00713.61
7.0.200.3080.00713.61
7.0.190.2600.00713.61
7.0.180.1710.00313.61
7.0.170.0040.00813.61
7.0.160.0060.00613.61
7.0.150.2150.00013.61
7.0.140.0100.00313.61
7.0.130.1560.00713.61
7.0.120.1390.00713.61
7.0.110.1450.01013.61
7.0.100.1460.00713.61
7.0.90.1370.00613.61
7.0.80.0950.00313.61
7.0.70.0110.00713.61
7.0.60.1200.01313.61
7.0.50.0830.01113.61
7.0.40.0040.01313.61
7.0.30.1190.00313.61
7.0.20.0970.00713.61
7.0.10.1440.00313.61
7.0.00.1690.00313.61
5.6.380.0230.03114.67
5.6.370.0120.03214.81
5.6.360.0360.02814.82
5.6.350.0330.02615.15
5.6.340.0280.02515.04
5.6.330.0340.01715.05
5.6.320.0210.03515.04
5.6.310.0240.03714.80
5.6.300.0150.03015.12
5.6.290.0130.03014.97
5.6.280.0090.03915.00
5.6.270.0260.02214.94
5.6.260.0300.03415.22
5.6.250.0220.02214.80
5.6.240.0160.02814.84
5.6.230.0260.03814.74
5.6.220.0240.03815.13
5.6.210.0390.02114.89
5.6.200.0340.01514.86
5.6.190.0440.03714.68
5.6.180.0170.03215.23
5.6.170.0160.03714.82
5.6.160.0260.03615.14
5.6.150.0170.02414.78
5.6.140.0420.02414.94
5.5.380.0120.04213.61
5.5.370.0250.02813.61
5.5.360.0240.03213.61
5.5.350.0130.02713.61
5.5.340.0350.02213.61
5.5.330.0230.02313.61
5.5.320.0220.02813.61
5.5.310.0100.02813.61
5.5.300.0120.03713.61

preferences:
134.54 ms | 1398 KiB | 7 Q