3v4l.org

run code in 300+ PHP versions simultaneously
<?php $diff = strtotime('2015-04-14T10:55:28+01:00') - strtotime('2015-04-13T13:19:03+01:00'); function secs_to_h($secs) { $units = array( "week" => 7*24*3600, "day" => 24*3600, "hour" => 3600, "minute" => 60, "second" => 1, ); // specifically handle zero if ( $secs == 0 ) return "0 seconds"; $s = ""; foreach ( $units as $name => $divisor ) { if ( $quot = intval($secs / $divisor) ) { $s .= "$quot $name"; $s .= (abs($quot) > 1 ? "s" : "") . ", "; $secs -= $quot * $divisor; } } return substr($s, 0, -2); } var_dump($diff, gmdate("H",$diff), secs_to_h($diff));

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)
8.3.60.0100.00316.63
8.3.50.0150.00622.08
8.3.40.0000.01419.11
8.3.30.0060.01219.22
8.3.20.0040.00420.16
8.3.10.0080.00021.82
8.3.00.0080.00020.94
8.2.180.0100.01016.75
8.2.170.0090.00622.96
8.2.160.0040.01120.27
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00619.79
8.2.110.0000.00820.58
8.2.100.0090.00318.16
8.2.90.0030.00619.21
8.2.80.0000.00817.97
8.2.70.0060.00317.75
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0000.00818.34
8.2.30.0000.00718.07
8.2.20.0020.00517.82
8.2.10.0000.00718.07
8.2.00.0030.00517.82
8.1.280.0120.00325.92
8.1.270.0000.00820.73
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0030.00623.82
8.1.230.0000.01119.21
8.1.220.0040.00417.74
8.1.210.0080.00018.77
8.1.200.0030.00617.36
8.1.190.0040.00417.35
8.1.180.0040.00818.10
8.1.170.0060.00318.71
8.1.160.0000.00721.93
8.1.150.0030.00318.95
8.1.140.0040.00419.42
8.1.130.0100.00017.98
8.1.120.0000.00717.68
8.1.110.0080.00017.68
8.1.100.0000.00717.63
8.1.90.0000.00717.64
8.1.80.0040.00417.55
8.1.70.0040.00417.52
8.1.60.0000.00917.70
8.1.50.0060.00617.51
8.1.40.0040.00417.55
8.1.30.0060.00317.68
8.1.20.0040.00417.72
8.1.10.0000.00717.48
8.1.00.0000.00817.61
8.0.300.0070.00018.77
8.0.290.0030.00616.75
8.0.280.0050.00318.56
8.0.270.0030.00317.32
8.0.260.0050.00317.39
8.0.250.0040.00417.04
8.0.240.0070.00017.06
8.0.230.0040.00417.19
8.0.220.0040.00417.05
8.0.210.0030.00317.04
8.0.200.0050.00217.21
8.0.190.0000.00717.17
8.0.180.0040.00417.07
8.0.170.0000.00817.13
8.0.160.0040.00417.06
8.0.150.0000.00717.05
8.0.140.0040.00417.02
8.0.130.0000.00713.49
8.0.120.0000.00817.05
8.0.110.0040.00417.04
8.0.100.0040.00416.90
8.0.90.0040.00417.05
8.0.80.0180.00417.01
8.0.70.0070.00017.09
8.0.60.0030.00516.98
8.0.50.0000.00817.12
8.0.30.0120.00917.33
8.0.20.0120.01117.40
8.0.10.0040.00417.03
8.0.00.0100.00916.83
7.4.330.0000.00515.14
7.4.320.0040.00416.54
7.4.300.0060.00016.68
7.4.290.0040.00416.54
7.4.280.0000.00716.64
7.4.270.0030.00316.76
7.4.260.0030.00316.51
7.4.250.0000.00716.59
7.4.240.0040.00416.78
7.4.230.0070.00016.80
7.4.220.0090.00916.75
7.4.210.0050.01216.71
7.4.200.0070.00016.83
7.4.160.0030.01316.68
7.4.150.0120.00617.40
7.4.140.0030.01317.86
7.4.130.0120.00516.70
7.4.120.0070.01016.60
7.4.110.0140.00716.51
7.4.100.0130.00716.51
7.4.90.0070.01416.74
7.4.80.0030.01616.77
7.4.70.0000.01816.68
7.4.60.0070.01016.58
7.4.50.0040.00016.77
7.4.40.0170.00016.77
7.4.30.0140.00716.66
7.4.00.0020.01615.08
7.3.330.0060.00013.51
7.3.320.0100.00313.48
7.3.310.0050.00316.53
7.3.300.0030.00516.36
7.3.290.0030.00316.54
7.3.280.0130.00316.47
7.3.270.0110.00717.40
7.3.260.0150.00316.71
7.3.250.0090.01216.51
7.3.240.0090.00916.79
7.3.230.0110.00716.64
7.3.210.0130.01016.43
7.3.200.0160.00619.39
7.3.190.0130.00316.50
7.3.180.0030.01216.72
7.3.170.0150.00716.75
7.3.160.0150.00416.61
7.3.120.0030.01514.89
7.3.110.0000.01414.97
7.3.100.0060.00315.14
7.3.90.0080.00615.11
7.3.80.0030.00914.89
7.3.70.0000.01814.81
7.3.60.0090.00614.97
7.3.50.0040.01115.16
7.3.40.0030.00914.93
7.3.30.0060.01014.83
7.3.20.0070.01116.83
7.3.10.0060.00616.90
7.3.00.0030.01416.86
7.2.330.0040.01217.00
7.2.320.0090.01516.77
7.2.310.0150.00716.70
7.2.300.0100.01016.85
7.2.290.0160.00616.70
7.2.250.0060.01015.45
7.2.240.0130.00615.14
7.2.230.0120.00315.20
7.2.220.0000.01015.09
7.2.210.0070.00715.22
7.2.200.0070.01015.31
7.2.190.0060.00915.01
7.2.180.0070.00715.11
7.2.170.0040.00815.26
7.2.60.0080.00417.00
7.2.00.0030.00919.50
7.1.330.0110.00616.04
7.1.320.0070.00315.75
7.1.310.0090.00616.07
7.1.300.0100.00315.96
7.1.290.0070.00715.86
7.1.280.0100.00315.56
7.1.270.0060.00916.09
7.1.260.0120.00316.07
7.1.200.0060.00515.74
7.1.100.0040.00818.41
7.1.70.0080.00417.41
7.1.60.0070.01819.46
7.1.50.0100.01316.86
7.1.00.0100.07022.30
7.0.200.0100.00317.04
7.0.140.0000.07722.09
7.0.60.0070.07319.87
7.0.50.0000.06017.89
7.0.40.0070.09020.15
7.0.30.0300.06720.26
7.0.20.0200.08020.24
7.0.10.0030.06020.10
7.0.00.0100.06720.01
5.6.210.0030.08320.72
5.6.200.0070.05718.23
5.6.190.0030.07720.46
5.6.180.0370.07020.41
5.6.170.0270.05320.55
5.6.160.0070.04320.54
5.6.150.0000.04318.24
5.6.140.0100.07018.12
5.6.130.0070.05018.21
5.6.120.0100.06020.99
5.6.110.0100.04721.03
5.6.100.0070.08020.96
5.6.90.0130.09020.97
5.6.80.0130.04720.38
5.5.350.0200.04020.38
5.5.340.0000.04017.95
5.5.330.0100.04320.41
5.5.320.0000.04320.27
5.5.310.0230.04720.32
5.5.300.0070.06318.03
5.5.290.0070.08017.98
5.5.280.0070.05020.97
5.5.270.0130.07720.73
5.5.260.0270.05020.77
5.5.250.0170.07720.71
5.5.240.0170.06320.19
5.4.450.0130.06019.57
5.4.440.0870.05019.61
5.4.430.1070.04719.19
5.4.420.0830.05019.47
5.4.410.0900.05019.50
5.4.400.0830.05319.26
5.4.390.0200.05718.59
5.4.380.0100.07018.59
5.4.370.0270.05318.53
5.4.360.0200.07718.61
5.4.350.0370.06018.74
5.4.340.0230.07318.47
5.4.320.0270.07018.62
5.4.310.0130.06018.83
5.4.300.0270.04318.53
5.4.290.0130.05318.78
5.4.280.0200.05718.75
5.4.270.0400.04318.50
5.4.260.0070.06318.62
5.4.250.0200.06018.55
5.4.240.0070.08718.59
5.4.230.0170.05718.63
5.4.220.0200.06018.75
5.4.210.0270.04318.40
5.4.200.0200.04716.78
5.4.190.0200.05318.57
5.4.180.0330.06018.71
5.4.170.0270.07018.55
5.4.160.0330.06318.54
5.4.150.0330.06018.54
5.4.140.0170.06016.23
5.4.130.0100.05716.29
5.4.120.0130.05316.25
5.4.110.0230.04316.44
5.4.100.0200.05016.46
5.4.90.0130.05716.34
5.4.80.0230.04716.40
5.4.70.0170.05716.26
5.4.60.0200.05016.17
5.4.50.0200.05016.20
5.4.40.0200.05316.16
5.4.30.0070.06316.22
5.4.20.0170.05716.41
5.4.10.0330.03316.39
5.4.00.0070.06015.71
5.3.290.0170.06014.72
5.3.280.0130.06014.81
5.3.270.0330.04014.63
5.3.260.0200.05014.63
5.3.250.0200.05714.81
5.3.240.0230.05314.62
5.3.230.0270.04314.77
5.3.220.0200.05014.67
5.3.210.0230.05014.58
5.3.200.0170.05014.69
5.3.190.0170.06014.79
5.3.180.0200.04714.66
5.3.170.0330.04314.59
5.3.160.0170.07014.60
5.3.150.0170.05314.62
5.3.140.0200.05014.66
5.3.130.0170.05714.56
5.3.120.0070.06314.68
5.3.110.0170.05314.75
5.3.100.0170.05314.04
5.3.90.0170.04714.00
5.3.80.0200.04714.14
5.3.70.0200.05014.15
5.3.60.0130.05314.12
5.3.50.0130.05714.05
5.3.40.0200.04714.07
5.3.30.0170.04713.95
5.3.20.0130.05313.77
5.3.10.0100.05313.68
5.3.00.0200.05013.70
5.2.170.0170.04311.27
5.2.160.0100.04711.26
5.2.150.0130.04311.20
5.2.140.0230.03711.25
5.2.130.0070.04711.14
5.2.120.0100.04311.10
5.2.110.0130.04011.08
5.2.100.0130.04011.11
5.2.90.0230.03311.20
5.2.80.0200.03711.17
5.2.70.0170.04011.14
5.2.60.0100.04311.08
5.2.50.0100.04711.05
5.2.40.0130.04311.22
5.2.30.0100.04311.07
5.2.20.0170.03311.09
5.2.10.0030.04710.96
5.2.00.0030.05010.84
5.1.60.0030.05710.00
5.1.50.0170.03710.10
5.1.40.0100.04010.09
5.1.30.0170.03710.33
5.1.20.0170.03310.39
5.1.10.0170.03310.19
5.1.00.0100.04010.11
5.0.50.0100.0278.66
5.0.40.0070.0308.52
5.0.30.0130.0378.28
5.0.20.0070.0308.25
5.0.10.0000.0378.32
5.0.00.0100.0438.25
4.4.90.0070.0275.97
4.4.80.0100.0205.93
4.4.70.0030.0235.92
4.4.60.0030.0235.89
4.4.50.0000.0275.95
4.4.40.0030.0376.01
4.4.30.0070.0205.94
4.4.20.0070.0206.03
4.4.10.0070.0206.07
4.4.00.0030.0376.04
4.3.110.0070.0235.93
4.3.100.0000.0275.87
4.3.90.0000.0275.88
4.3.80.0100.0335.80
4.3.70.0000.0305.82
4.3.60.0200.0205.81
4.3.50.0030.0305.84
4.3.40.0030.0375.79
4.3.30.0000.0275.50
4.3.20.0000.0275.50
4.3.10.0100.0205.50
4.3.00.0170.03014.57

preferences:
44.02 ms | 401 KiB | 5 Q