3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo "Now: ", $now = strtotime("now"), "\n"; echo "Then: ", $then = strtotime("now -2 years"), "\n"; echo "400 years ago: ", $now2 = strtotime("now -6 years"), "\n"; echo "420 years ago: ", $then2 = strtotime("now -8 years"), "\n"; echo "Dif 1: ", $dif1 = ($now-$then) / 60 / 60, " hours\n"; echo "Dif 2: ", $dif2 = ($now2-$then2) / 60 / 60, " hours\n"; echo "Simple: ", $simple = 2*365*24, " hours\n"; echo "Dif1 to dif2 ", $dif1 - $dif2, "hours\n"; echo "Dif1 to simple ", $dif1 - $simple, "hours\n";
based on mpO4P

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.2.60.0030.00617.06
7.2.00.0350.00318.77
7.1.200.0220.00615.89
7.1.100.0040.00418.10
7.1.70.0030.00517.35
7.1.60.0110.00419.40
7.1.50.0040.00717.18
7.1.00.0070.07322.51
7.0.200.0370.00714.93
7.0.60.0170.07021.70
7.0.50.0030.05717.68
7.0.40.0100.06020.02
7.0.30.0230.07320.34
7.0.20.0330.06320.02
7.0.10.0070.08720.04
7.0.00.0070.08320.09
5.6.280.0070.06721.08
5.6.210.0070.08020.56
5.6.200.0000.05318.12
5.6.190.0170.08020.43
5.6.180.0230.03720.45
5.6.170.0400.07020.50
5.6.160.0070.05320.52
5.6.150.0070.08318.16
5.6.140.0100.05718.18
5.6.130.0000.07018.18
5.6.120.0030.04021.08
5.6.110.0100.06321.09
5.6.100.0130.07021.02
5.6.90.0100.08720.96
5.6.80.0130.06720.48
5.5.350.0230.05720.52
5.5.340.0000.04317.99
5.5.330.0070.06320.37
5.5.320.0500.04720.13
5.5.310.0270.07720.24
5.5.300.0130.07717.96
5.5.290.0030.04017.91
5.5.280.0100.07320.77
5.5.270.0100.08020.87
5.5.260.0170.07720.72
5.5.250.0000.04320.59
5.5.240.0270.04020.32
5.4.450.0670.06019.65
5.4.440.0130.05319.43
5.4.430.0370.06319.42
5.4.420.0870.06019.51
5.4.410.0830.05319.41
5.4.400.0630.05019.10
5.4.390.0600.05319.20
5.4.380.0830.05018.87
5.4.370.0770.05019.11
5.4.360.0800.05019.16
5.4.350.0670.06319.29
5.4.340.0830.04719.16
5.4.320.0870.05718.87
5.4.310.0530.05718.91
5.4.300.0770.05019.32
5.4.290.0800.05018.87
5.4.280.0700.06019.32
5.4.270.0700.05719.11
5.4.260.0800.05319.22
5.4.250.0930.04718.91
5.4.240.0630.05318.86
5.4.230.0700.05019.13
5.4.220.0830.05018.88
5.4.210.0770.05019.25
5.4.200.0870.04019.25
5.4.190.0800.05719.14
5.4.180.0700.05719.22
5.4.170.0730.05719.19
5.4.160.0830.04719.21
5.4.150.0700.06019.14
5.4.140.0770.05016.47
5.4.130.0630.06016.31
5.4.120.0800.04316.46
5.3.290.0830.05314.61
5.3.280.0830.05014.47
5.3.270.0870.04714.54
5.3.260.0830.04714.55
5.3.250.0770.05014.55
5.3.240.0870.04014.54
5.3.230.0770.05314.52
5.3.220.0930.05314.46