3v4l.org

run code in 300+ PHP versions simultaneously
<?php $date = new \DateTime('-4 month', new \DateTimeZone('GMT')); //echo $date->format('m-d-Y'); $quarter = ceil($date->format('n') / 3); $year = $date->format('Y'); $month = $quarter * 3 + 1; $date = \DateTime::createFromFormat('Y-n-j H:i', strval($year+1)."-$month-1 00:00"); echo $date->format('d-m-Y H:i') . "\n"; echo date('d-m-Y H:i', $date->getTimestamp()) . "\n"; echo (new \DateTime('@'.$date->getTimestamp()->format('d-m-Y H:i');

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.0.20.0170.04020.10
7.0.10.0170.08320.15
7.0.00.0100.05020.06
5.6.170.0270.07720.47
5.6.160.0030.08020.55
5.6.150.0030.04018.15
5.6.140.0030.08718.19
5.6.130.0130.07318.27
5.6.120.0200.07320.89
5.6.110.0130.06021.13
5.6.100.0130.04321.13
5.6.90.0030.06721.03
5.6.80.0130.07720.41
5.5.310.0370.06320.36
5.5.300.0070.03717.95
5.5.290.0170.07717.95
5.5.280.0030.09020.80
5.5.270.0100.05720.75
5.5.260.0100.06020.88
5.5.250.0070.07720.58
5.5.240.0070.06020.23

preferences:
136.16 ms | 1394 KiB | 7 Q