3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = new DateTime('2015-05-04 17:22'); var_dump((string) $a->format('Y-m-d H:i:s')); $a->modify('+1 day'); var_dump((string) $a->format('Y-m-d H:i:s')); $a->modify('+1 weekday'); var_dump((string) $a->format('Y-m-d H:i:s')); var_dump(date('Y-m-d H:i:s', strtotime('+1 weekday')));

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.3.10.0090.00916.66
7.3.00.0110.01116.69
7.2.130.0120.00916.80
7.2.120.0070.01416.64
7.2.110.0150.00017.01
7.2.100.0060.01016.76
7.2.90.0170.00716.84
7.2.80.0070.00716.66
7.2.70.0170.00717.00
7.2.60.0130.00516.99
7.2.50.0120.00816.70
7.2.40.0060.01317.04
7.2.30.0180.00616.88
7.2.20.0070.01416.86
7.2.10.0100.00717.05
7.2.00.0080.00818.18
7.1.250.0080.00815.60
7.1.200.0130.00015.52
7.1.100.0100.00318.15
7.1.70.0190.00317.33
7.1.60.0130.01319.50
7.1.50.0070.01416.86
7.1.00.0070.07322.35
7.0.200.0050.00514.89
7.0.140.0000.07721.95
7.0.80.0170.07319.93
7.0.70.0200.03719.95
7.0.60.0330.05719.97
7.0.50.0270.05320.17
7.0.40.0000.04320.01
7.0.30.0070.03320.03
7.0.20.0000.08719.89
7.0.10.0030.03720.16
7.0.00.0130.03720.08
5.6.280.0000.07721.12
5.6.230.0100.03720.50
5.6.220.0000.04320.55
5.6.210.0070.03020.55
5.6.200.0030.03721.02
5.6.190.0100.04321.10
5.6.180.0000.04321.04
5.6.170.0100.08021.05
5.6.160.0030.04021.03
5.6.150.0130.05021.17
5.6.140.0000.03721.09
5.6.130.0070.04021.13
5.6.120.0100.04021.01
5.6.110.0030.03720.92
5.6.100.0030.05021.08
5.6.90.0000.04321.02
5.6.80.0070.03020.48
5.6.70.0070.04720.39
5.6.60.0030.04020.45
5.6.50.0070.07720.55
5.6.40.0100.06720.37
5.6.30.0100.07320.44
5.6.20.0070.08020.30
5.6.10.0100.05320.29
5.6.00.0070.04320.36
5.5.370.0100.03720.49
5.5.360.0000.04320.48
5.5.350.0100.05720.45
5.5.340.0070.04020.60
5.5.330.0070.04320.76
5.5.320.0070.03720.83
5.5.310.0030.04320.86
5.5.300.0030.03720.75
5.5.290.0070.03720.80
5.5.280.0000.04320.91
5.5.270.0070.03720.82
5.5.260.0000.04020.89
5.5.250.0030.04320.45
5.5.240.0030.04020.11
5.5.230.0070.04720.25
5.5.220.0000.04020.13
5.5.210.0170.05320.16
5.5.200.0070.08020.13
5.5.190.0070.08319.99
5.5.180.0030.07720.24
5.5.160.0100.06020.14
5.5.150.0070.06720.16
5.5.140.0070.05020.23
5.5.130.0100.08320.24
5.5.120.0070.08720.10
5.5.110.0030.05020.21
5.5.100.0070.06320.11
5.5.90.0130.07320.12
5.5.80.0030.05320.07
5.5.70.0200.07020.01
5.5.60.0070.07719.91
5.5.50.0070.07320.06
5.5.40.0170.07320.09
5.5.30.0100.07720.02
5.5.20.0070.07720.04
5.5.10.0070.07020.11
5.5.00.0130.07320.00
5.4.450.0070.04019.35
5.4.440.0170.03019.30
5.4.430.0070.04019.35
5.4.420.0000.04719.28
5.4.410.0070.05319.17
5.4.400.0070.04018.91
5.4.390.0100.07318.81
5.4.380.0030.04319.23
5.4.370.0030.08318.90
5.4.360.0070.07719.07
5.4.350.0170.04719.23
5.4.340.0130.06718.80
5.4.320.0100.07718.91
5.4.310.0000.08019.20
5.4.300.0070.08019.14
5.4.290.0030.08719.24
5.4.280.0100.08019.09
5.4.270.0100.06019.05
5.4.260.0100.04018.78
5.4.250.0100.07019.05
5.4.240.0030.06019.02
5.4.230.0100.07019.02
5.4.220.0030.08318.80
5.4.210.0100.07719.05
5.4.200.0100.07019.06
5.4.190.0070.08319.11
5.4.180.0130.06718.77
5.4.170.0170.06719.21
5.4.160.0000.08019.02
5.4.150.0170.06718.95
5.4.140.0070.05016.44
5.4.130.0100.07016.41
5.4.120.0030.07316.33
5.4.110.0130.07016.32
5.4.100.0100.05016.49
5.4.90.0100.04716.46
5.4.80.0030.07316.27
5.4.70.0100.06316.27
5.4.60.0170.06316.20
5.4.50.0130.07316.28
5.4.40.0200.07016.35
5.4.30.0030.05716.23
5.4.20.0030.04016.23
5.4.10.0030.05716.30
5.4.00.0070.04015.51
5.3.290.0130.07314.62
5.3.280.0070.07314.55
5.3.270.0100.07714.46
5.3.260.0100.08014.51
5.3.250.0100.07014.56
5.3.240.0100.07714.59
5.3.230.0130.07714.48
5.3.220.0230.06314.52
5.3.210.0170.07014.54
5.3.200.0070.08314.43
5.3.190.0100.07714.40
5.3.180.0070.07014.52
5.3.170.0070.08014.38
5.3.160.0030.05314.39
5.3.150.0070.06714.55
5.3.140.0130.07314.51
5.3.130.0300.06014.48
5.3.120.0070.07014.54
5.3.110.0100.03714.38
5.3.100.0070.04313.89
5.3.90.0100.07014.01
5.3.80.0030.08013.99
5.3.70.0070.07314.00
5.3.60.0030.07713.99
5.3.50.0030.06713.90
5.3.40.0170.06713.71
5.3.30.0100.05313.69
5.3.20.0070.07013.60
5.3.10.0030.06013.66
5.3.00.0030.06313.61
5.2.170.0030.06711.48
5.2.160.0070.05711.48
5.2.150.0070.06311.48
5.2.140.0070.05311.48
5.2.130.0130.05011.48
5.2.120.0130.05711.48
5.2.110.0070.06311.48
5.2.100.0000.05711.48
5.2.90.0070.06011.48
5.2.80.0070.05011.48
5.2.70.0000.06311.48
5.2.60.0070.05011.48
5.2.50.0030.05711.48
5.2.40.0030.06311.48
5.2.30.0030.06311.48
5.2.20.0070.05311.48
5.2.10.0030.06311.48
5.2.00.0030.05311.48
5.1.60.0100.03011.48
5.1.50.0000.06011.48
5.1.40.0000.03711.48
5.1.30.0030.05711.48
5.1.20.0030.06311.48
5.1.10.0070.05011.48
5.1.00.0070.05711.48
5.0.50.0100.04311.48
5.0.40.0000.03711.48
5.0.30.0030.04311.48
5.0.20.0030.04011.48
5.0.10.0030.04711.48
5.0.00.0030.05311.48
4.4.90.0000.03711.48
4.4.80.0030.03711.48
4.4.70.0000.04011.48
4.4.60.0030.03711.48
4.4.50.0000.03711.48
4.4.40.0030.03311.48
4.4.30.0000.03011.48
4.4.20.0030.03711.48
4.4.10.0000.03711.48
4.4.00.0070.05011.48
4.3.110.0030.01711.48
4.3.100.0030.03011.48
4.3.90.0000.03011.48
4.3.80.0000.04011.48
4.3.70.0000.03711.48
4.3.60.0000.03711.48
4.3.50.0000.03011.48
4.3.40.0030.04011.48
4.3.30.0000.03711.48
4.3.20.0030.03711.48
4.3.10.0000.03711.48
4.3.00.0030.03311.48