3v4l.org

run code in 300+ PHP versions simultaneously
<?php function diffInDays($date1,$date2) { $diff = $date1-$date2; return floor($diff/3600/24); } echo diffInDays(strtotime('2014-05-30'),time());

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.60.0000.01516.70
7.2.00.0000.01319.22
7.1.200.0000.01115.88
7.1.100.0070.00718.40
7.1.70.0040.00416.99
7.1.60.0130.01319.40
7.1.50.0090.00617.16
7.1.00.0070.03022.43
7.0.200.0270.00715.11
7.0.140.0070.07022.00
7.0.120.0100.06322.18
7.0.100.0100.08321.80
7.0.90.0070.07721.72
7.0.80.0000.09021.66
7.0.70.0030.08721.96
7.0.60.0070.06721.76
7.0.50.0000.09322.16
7.0.40.0100.04720.01
7.0.30.0030.08720.11
7.0.20.0100.08020.07
7.0.10.0100.05720.07
7.0.00.0100.05020.17
5.6.250.0070.09020.81
5.6.240.0100.07720.63
5.6.230.0070.08020.57
5.6.220.0070.05720.50
5.6.210.0030.04720.69
5.6.200.0200.06321.03
5.6.190.0200.07321.04
5.6.180.0070.08321.01
5.6.170.0000.05321.04
5.6.160.0100.06021.03
5.6.150.0130.05721.01
5.6.140.0070.07320.98
5.6.130.0130.08321.17
5.6.120.0100.04721.07
5.6.110.0100.06321.02
5.6.100.0000.09021.02
5.6.90.0070.05321.07
5.6.80.0070.07720.47
5.6.70.0070.08020.49
5.6.60.0070.07320.31
5.6.50.0100.06320.49
5.6.40.0030.06020.42
5.6.30.0070.08020.33
5.6.20.0130.06020.46
5.6.10.0100.03720.46
5.6.00.0130.07320.28
5.5.380.0030.07020.52
5.5.370.0100.07020.42
5.5.360.0100.07720.39
5.5.350.0100.04320.43
5.5.340.0070.04020.93
5.5.330.0070.06720.80
5.5.320.0030.05020.86
5.5.310.0000.09320.88
5.5.300.0170.06720.79
5.5.290.0000.06720.76
5.5.280.0100.07720.91
5.5.270.0130.05320.72
5.5.260.0100.04720.79
5.5.250.0070.08020.57
5.5.240.0100.06020.22
5.5.230.0070.04720.25
5.5.220.0070.08320.18
5.5.210.0130.05320.18
5.5.200.0130.06720.24
5.5.190.0100.07720.20
5.5.180.0070.08319.96
5.5.160.0100.04019.99
5.5.150.0070.07720.08
5.5.140.0100.07020.08
5.5.130.0100.06320.26
5.5.120.0070.08320.27
5.5.110.0070.08020.25
5.5.100.0100.07319.99
5.5.90.0100.08020.07
5.5.80.0100.04020.15
5.5.70.0100.06719.94
5.5.60.0170.07020.05
5.5.50.0100.07020.08
5.5.40.0030.07720.15
5.5.30.0070.04320.05
5.5.20.0030.08020.14
5.5.10.0100.04720.05
5.5.00.0000.08320.04
5.4.450.0030.07719.18
5.4.440.0100.05019.49
5.4.430.0070.04319.53
5.4.420.0100.04319.45
5.4.410.0100.04319.40
5.4.400.0200.03019.05
5.4.390.0030.07719.23
5.4.380.0070.07319.12
5.4.370.0030.06719.09
5.4.360.0000.05319.05
5.4.350.0070.03718.88
5.4.340.0100.07319.03
5.4.320.0170.04319.23
5.4.310.0130.04719.14
5.4.300.0100.06319.04
5.4.290.0130.06719.16
5.4.280.0070.07019.05
5.4.270.0130.07319.13
5.4.260.0100.07018.90
5.4.250.0030.06319.20
5.4.240.0170.03719.02
5.4.230.0070.07718.84
5.4.220.0070.05018.92
5.4.210.0100.07319.13
5.4.200.0030.07019.11
5.4.190.0030.04018.93
5.4.180.0130.06719.22
5.4.170.0100.03719.12
5.4.160.0070.07018.86
5.4.150.0070.08019.11
5.4.140.0030.04716.52
5.4.130.0130.04316.48
5.4.120.0130.06316.49
5.4.110.0030.03316.38
5.4.100.0030.07016.57
5.4.90.0070.05716.44
5.4.80.0070.06316.55
5.4.70.0000.03716.54
5.4.60.0030.03316.32
5.4.50.0030.04716.48
5.4.40.0030.04716.54
5.4.30.0170.06016.36
5.4.20.0130.05016.46
5.4.10.0030.05316.43
5.4.00.0100.06715.90
5.3.290.0030.08014.71
5.3.280.0030.08014.68
5.3.270.0070.05314.61
5.3.260.0000.07314.66
5.3.250.0100.07714.66
5.3.240.0130.03014.61
5.3.230.0070.07014.56
5.3.220.0000.07014.68
5.3.210.0000.05014.57
5.3.200.0030.05014.55
5.3.190.0070.07314.70
5.3.180.0070.03014.56
5.3.170.0030.03314.63
5.3.160.0100.07314.65
5.3.150.0070.06314.48
5.3.140.0030.07714.48
5.3.130.0000.07014.70
5.3.120.0070.07314.48
5.3.110.0070.07014.53
5.3.100.0100.03714.14
5.3.90.0000.07714.04
5.3.80.0030.06713.95
5.3.70.0000.04313.94
5.3.60.0030.03713.89
5.3.50.0030.05314.03
5.3.40.0070.07013.97
5.3.30.0070.07313.79
5.3.20.0130.06313.79
5.3.10.0100.07013.75
5.3.00.0100.07313.54
5.2.170.0000.03311.17
5.2.160.0070.05711.23
5.2.150.0100.03011.16
5.2.140.0000.07011.13
5.2.130.0030.06011.13
5.2.120.0000.06311.01
5.2.110.0000.03711.00
5.2.100.0070.06011.08
5.2.90.0030.05011.08
5.2.80.0100.04310.97
5.2.70.0030.06311.14
5.2.60.0070.06010.93
5.2.50.0030.05311.04
5.2.40.0100.03010.85
5.2.30.0030.03010.98
5.2.20.0030.03310.99
5.2.10.0100.02710.88
5.2.00.0000.06010.63
5.1.60.0070.0479.83
5.1.50.0070.0539.84
5.1.40.0070.0509.96
5.1.30.0000.03310.27
5.1.20.0030.05710.35
5.1.10.0000.04710.13
5.1.00.0030.05710.14
5.0.50.0000.0278.55
5.0.40.0030.0308.47
5.0.30.0100.0638.22
5.0.20.0030.0338.32
5.0.10.0000.0438.20
5.0.00.0070.0478.24
4.4.90.0030.0278.17
4.4.80.0000.0338.17
4.4.70.0030.0178.17
4.4.60.0000.0278.17
4.4.50.0000.0238.17
4.4.40.0000.0478.17
4.4.30.0070.0178.17
4.4.20.0030.0338.17
4.4.10.0030.0208.17
4.4.00.0000.0508.17
4.3.110.0000.0238.17
4.3.100.0030.0208.17
4.3.90.0100.0238.17
4.3.80.0000.0338.17
4.3.70.0030.0138.17
4.3.60.0000.0308.17
4.3.50.0000.0238.17
4.3.40.0000.0308.17
4.3.30.0100.0278.17
4.3.20.0000.0338.17
4.3.10.0030.0278.17
4.3.00.0030.0308.17

preferences:
43.85 ms | 400 KiB | 5 Q