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("m d H:i:s",$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.0170.00016.38
8.3.50.0080.00922.18
8.3.40.0110.00718.84
8.3.30.0130.00619.13
8.3.20.0030.00520.30
8.3.10.0100.00021.87
8.3.00.0050.00320.91
8.2.180.0130.00916.75
8.2.170.0120.00322.96
8.2.160.0130.00020.52
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0000.00919.66
8.2.110.0000.01020.35
8.2.100.0090.00317.97
8.2.90.0040.00418.47
8.2.80.0040.00417.97
8.2.70.0050.00317.75
8.2.60.0040.00417.91
8.2.50.0040.00418.07
8.2.40.0040.00418.16
8.2.30.0050.00218.29
8.2.20.0040.00417.88
8.2.10.0040.00418.09
8.2.00.0000.00817.98
8.1.280.0120.00325.92
8.1.270.0080.00020.78
8.1.260.0000.00726.35
8.1.250.0060.00328.09
8.1.240.0030.00622.20
8.1.230.0000.01120.76
8.1.220.0030.00517.79
8.1.210.0040.00418.85
8.1.200.0000.00917.47
8.1.190.0080.00017.47
8.1.180.0030.00618.10
8.1.170.0090.00018.67
8.1.160.0000.00721.93
8.1.150.0000.00718.87
8.1.140.0050.00319.34
8.1.130.0040.00417.81
8.1.120.0040.00317.66
8.1.110.0000.00717.66
8.1.100.0040.00317.61
8.1.90.0000.00717.67
8.1.80.0070.00017.58
8.1.70.0000.00717.60
8.1.60.0050.00317.71
8.1.50.0070.00317.64
8.1.40.0000.00817.64
8.1.30.0060.00317.77
8.1.20.0000.00817.80
8.1.10.0000.00717.57
8.1.00.0000.00817.64
8.0.300.0000.00720.03
8.0.290.0000.00717.00
8.0.280.0040.00418.42
8.0.270.0040.00417.32
8.0.260.0060.00017.39
8.0.250.0040.00417.13
8.0.240.0030.00317.04
8.0.230.0040.00417.16
8.0.220.0030.00317.08
8.0.210.0040.00417.10
8.0.200.0030.00317.04
8.0.190.0000.00817.05
8.0.180.0020.00517.15
8.0.170.0000.00817.02
8.0.160.0040.00416.99
8.0.150.0000.00817.08
8.0.140.0070.00017.00
8.0.130.0000.00513.50
8.0.120.0050.00317.06
8.0.110.0030.00516.93
8.0.100.0000.00717.05
8.0.90.0030.00517.09
8.0.80.0040.01817.08
8.0.70.0000.00717.04
8.0.60.0050.00317.04
8.0.50.0000.00817.11
8.0.30.0070.01617.37
8.0.20.0160.00617.45
8.0.10.0000.00717.20
8.0.00.0130.00516.94
7.4.330.0000.00515.18
7.4.320.0080.00016.69
7.4.300.0060.00016.59
7.4.290.0000.00816.77
7.4.280.0000.00716.74
7.4.270.0070.00016.62
7.4.260.0100.00016.51
7.4.250.0050.00216.74
7.4.240.0020.00516.71
7.4.230.0000.00716.47
7.4.220.0090.00916.73
7.4.210.0040.01416.71
7.4.200.0030.00316.67
7.4.160.0030.01316.58
7.4.150.0100.01017.40
7.4.140.0080.01017.86
7.4.130.0080.00916.72
7.4.120.0110.00616.54
7.4.110.0120.00616.63
7.4.100.0090.00916.68
7.4.90.0070.01016.76
7.4.80.0130.00316.66
7.4.70.0060.01116.77
7.4.60.0100.00616.70
7.4.50.0040.00016.54
7.4.40.0130.00316.56
7.4.30.0120.00616.66
7.4.00.0030.01415.27
7.3.330.0030.00313.43
7.3.320.0170.00013.34
7.3.310.0000.00816.31
7.3.300.0000.00716.35
7.3.290.0030.00316.50
7.3.280.0110.00916.47
7.3.270.0120.00617.40
7.3.260.0100.00716.68
7.3.250.0070.01116.63
7.3.240.0130.00616.65
7.3.230.0040.01916.52
7.3.210.0100.00616.66
7.3.200.0090.00919.39
7.3.190.0040.01216.64
7.3.180.0060.01016.55
7.3.170.0130.00916.73
7.3.160.0030.01316.65
7.3.120.0070.01114.98
7.3.110.0110.00415.28
7.3.100.0060.00614.97
7.3.90.0100.00715.14
7.3.80.0030.00615.00
7.3.70.0000.01114.95
7.3.60.0000.01215.11
7.3.50.0060.00615.19
7.3.40.0070.00415.13
7.3.30.0070.00314.69
7.3.20.0110.00016.52
7.3.10.0040.00816.89
7.3.00.0040.00716.80
7.2.330.0120.01216.49
7.2.320.0090.01216.93
7.2.310.0140.00716.66
7.2.300.0100.01016.92
7.2.290.0160.00616.89
7.2.250.0100.01015.20
7.2.240.0030.01715.04
7.2.230.0060.00715.36
7.2.220.0090.00615.20
7.2.210.0070.01015.30
7.2.200.0090.00315.10
7.2.190.0030.00915.30
7.2.180.0060.00915.29
7.2.170.0090.00615.23
7.2.00.0070.00719.64
7.1.330.0000.01316.10
7.1.320.0060.00916.02
7.1.310.0080.00815.88
7.1.300.0090.00315.87
7.1.290.0030.01416.10
7.1.280.0080.00816.02
7.1.270.0030.00615.91
7.1.260.0070.00715.75
7.1.100.0080.00418.55
7.1.70.0030.00317.38
7.1.60.0190.00619.46
7.1.50.0070.01417.27
7.1.00.0070.07022.28
7.0.200.0610.00014.79
7.0.140.0000.03721.98
7.0.60.0070.06720.04
7.0.50.0030.08017.98
7.0.40.0100.04320.25
7.0.30.0200.05020.17
7.0.20.0230.05020.24
7.0.10.0100.05320.23
7.0.00.0070.04320.06
5.6.280.0070.06721.15
5.6.210.0070.05720.47
5.6.200.0070.06718.15
5.6.190.0000.04720.77
5.6.180.0400.07320.67
5.6.170.0230.04020.48
5.6.160.0030.08020.57
5.6.150.0000.05018.13
5.6.140.0070.08018.18
5.6.130.0100.07318.28
5.6.120.0070.08720.87
5.6.110.0100.03721.04
5.6.100.0070.03721.01
5.6.90.0000.04320.96
5.6.80.0030.07720.51
5.5.350.0170.04720.41
5.5.340.0030.04318.09
5.5.330.0000.04720.26
5.5.320.0370.06720.38
5.5.310.0330.07320.37
5.5.300.0070.08317.98
5.5.290.0100.08317.91
5.5.280.0130.08020.77
5.5.270.0070.08320.83
5.5.260.0030.08020.73
5.5.250.0100.07720.55
5.5.240.0100.04320.18
5.4.450.0200.05019.60
5.4.440.0770.06019.62
5.4.430.0930.05019.33
5.4.420.0130.06019.46
5.4.410.0830.06019.03
5.4.400.0830.06319.31
5.4.390.0230.05318.62
5.4.380.0200.05318.59
5.4.370.0130.06018.80
5.4.360.0300.06318.61
5.4.350.0170.06318.50
5.4.340.0270.05318.76
5.4.320.0230.07318.65
5.4.310.0270.05318.59
5.4.300.0230.07718.61
5.4.290.0200.05718.72
5.4.280.0200.05318.75
5.4.270.0170.05318.60
5.4.260.0230.04718.57
5.4.250.0170.05718.78
5.4.240.0170.05718.77
5.4.230.0300.04018.59
5.4.220.0200.05318.55
5.4.210.0130.06018.82
5.4.200.0170.05316.54
5.4.190.0130.05718.73
5.4.180.0130.05718.73
5.4.170.0170.05318.52
5.4.160.0230.04718.72
5.4.150.0230.05318.60
5.4.140.0170.05316.46
5.4.130.0070.05716.39
5.4.120.0270.04016.34
5.4.110.0300.05016.46
5.4.100.0400.05316.45
5.4.90.0230.07316.36
5.4.80.0270.05316.29
5.4.70.0170.05716.28
5.4.60.0230.04716.23
5.4.50.0200.05016.20
5.4.40.0200.05016.25
5.4.30.0200.05016.25
5.4.20.0230.04716.18
5.4.10.0170.05716.26
5.4.00.0330.04315.82
5.3.290.0270.06014.72
5.3.280.0130.06314.62
5.3.270.0130.06014.73
5.3.260.0230.04714.78
5.3.250.0300.04714.81
5.3.240.0230.05714.63
5.3.230.0130.06014.80
5.3.220.0170.06014.66
5.3.210.0200.05314.61
5.3.200.0300.05014.70
5.3.190.0300.06714.68
5.3.180.0270.06714.59
5.3.170.0230.05314.66
5.3.160.0270.05014.69
5.3.150.0100.06714.71
5.3.140.0270.05014.65
5.3.130.0100.07714.54
5.3.120.0170.06014.64
5.3.110.0230.07714.56
5.3.100.0370.05314.22
5.3.90.0200.05714.24
5.3.80.0300.04014.06
5.3.70.0270.04014.19
5.3.60.0100.06314.21
5.3.50.0130.05713.95
5.3.40.0270.05314.15
5.3.30.0300.06013.91
5.3.20.0230.06713.69
5.3.10.0170.05013.64
5.3.00.0200.05013.71
5.2.170.0130.04311.19
5.2.160.0230.03311.27
5.2.150.0270.04711.20
5.2.140.0330.04011.22
5.2.130.0130.05711.12
5.2.120.0230.05011.21
5.2.110.0170.05011.09
5.2.100.0200.03311.30
5.2.90.0170.04011.13
5.2.80.0170.04711.30
5.2.70.0200.04311.13
5.2.60.0200.03711.10
5.2.50.0170.04311.02
5.2.40.0100.04711.02
5.2.30.0130.04711.08
5.2.20.0130.04311.00
5.2.10.0200.03710.91
5.2.00.0170.04310.90
5.1.60.0200.02710.03
5.1.50.0170.03710.08
5.1.40.0170.04010.17
5.1.30.0170.03310.38
5.1.20.0170.04010.57
5.1.10.0200.03010.11
5.1.00.0200.03010.18
5.0.50.0100.0308.70
5.0.40.0200.0178.51
5.0.30.0100.0438.24
5.0.20.0070.0308.41
5.0.10.0130.0338.21
5.0.00.0130.0538.17
4.4.90.0030.0405.93
4.4.80.0130.0205.89
4.4.70.0070.0235.95
4.4.60.0170.0235.91
4.4.50.0170.0275.98
4.4.40.0100.0405.91
4.4.30.0170.0205.90
4.4.20.0070.0235.95
4.4.10.0130.0206.00
4.4.00.0030.0376.02
4.3.110.0100.0205.95
4.3.100.0170.0135.82
4.3.90.0070.0235.90
4.3.80.0030.0405.93
4.3.70.0030.0235.80
4.3.60.0070.0205.80
4.3.50.0070.0275.91
4.3.40.0000.0405.82
4.3.30.0070.0235.32
4.3.20.0070.0235.32
4.3.10.0000.0275.32
4.3.00.0000.02014.57

preferences:
50.86 ms | 401 KiB | 5 Q