3v4l.org

run code in 300+ PHP versions simultaneously
<?php protected function setInterval($days, $months) { $years = 0; if ($months > 12) { $years = floor($months / 12); $months = $months % 12; } return "{$years} years, {$months} months, {$days} days"; } echo setInterval(0, 14);

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.10.0100.04320.09
7.0.00.0030.09020.05
5.6.160.0170.07720.46
5.6.150.0070.06718.18
5.6.140.0000.06718.14
5.6.130.0100.06318.19
5.6.120.0000.04720.89
5.6.110.0170.06321.13
5.6.100.0130.06721.12
5.6.90.0230.07021.06
5.6.80.0170.04020.48
5.5.300.0130.05018.01
5.5.290.0100.04017.98
5.5.280.0000.04320.77
5.5.270.0070.05720.79
5.5.260.0100.03720.79
5.5.250.0000.05020.61
5.5.240.0230.06720.27

preferences:
139.72 ms | 1394 KiB | 7 Q