3v4l.org

run code in 300+ PHP versions simultaneously
<?php // suppose this is your mysql data, each inner pair is a 'to', 'from' $rows = array( array(1,6), array(7,10), array(8,12) ); list($a, $b) = current($rows); $downtime = $b - $a; while( list($c, $d) = next($rows) ) { $downtime += $d - $c - max(0, min($d,$b)-$c); if( $c >= $b ) $a = $c; $b = max($b,$d); } echo "total down time is " , $downtime; ?>

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.4.130.0140.00717.52
8.4.120.0140.00523.88
8.4.110.0110.00822.21
8.4.100.0040.00517.70
8.4.90.0160.00418.73
8.4.80.0070.00417.80
8.4.70.0060.00417.56
8.4.60.0070.01318.72
8.4.50.0140.00718.55
8.4.40.0160.00317.61
8.4.30.0170.00317.67
8.4.20.0130.00617.96
8.4.10.0070.00317.67
8.3.260.0020.00716.40
8.3.250.0080.00319.08
8.3.240.0100.00918.77
8.3.230.0100.00216.48
8.3.220.0110.00616.95
8.3.210.0120.00616.56
8.3.200.0030.00616.56
8.3.190.0080.00617.03
8.3.180.0040.00418.84
8.3.170.0090.00920.80
8.3.160.0120.00616.79
8.3.150.0140.00417.30
8.3.140.0080.00016.50
8.3.130.0050.00318.51
8.3.120.0160.00318.73
8.3.110.0060.00320.94
8.3.100.0060.00324.06
8.3.90.0110.00426.77
8.3.80.0110.00017.97
8.3.70.0110.00818.43
8.3.60.0120.00618.30
8.3.50.0080.01122.05
8.3.40.0030.01318.84
8.3.30.0000.01418.86
8.3.20.0040.00420.16
8.3.10.0070.00021.60
8.3.00.0040.00417.93
8.2.290.0060.00920.52
8.2.280.0120.00418.41
8.2.270.0030.00519.07
8.2.260.0030.00516.73
8.2.250.0030.00518.61
8.2.240.0090.00016.51
8.2.230.0030.00622.58
8.2.220.0080.00837.54
8.2.210.0070.01126.77
8.2.200.0130.00316.38
8.2.190.0120.00916.58
8.2.180.0130.00618.25
8.2.170.0070.01022.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00720.94
8.2.110.0030.00721.11
8.2.100.0040.00717.84
8.2.90.0000.00819.13
8.2.80.0000.00817.97
8.2.70.0050.00317.59
8.2.60.0060.00318.03
8.2.50.0040.00418.07
8.2.40.0030.00619.52
8.2.30.0000.00720.71
8.2.20.0080.00017.64
8.2.10.0040.00418.18
8.2.00.0040.00418.14
8.1.330.0080.01020.20
8.1.320.0100.00916.09
8.1.310.0030.00618.29
8.1.300.0040.01120.20
8.1.290.0030.00630.84
8.1.280.0090.00625.92
8.1.270.0080.00023.96
8.1.260.0000.00728.09
8.1.250.0040.00428.09
8.1.240.0000.00921.37
8.1.230.0160.00017.49
8.1.220.0060.00317.78
8.1.210.0000.00818.77
8.1.200.0050.00517.36
8.1.190.0000.00817.22
8.1.180.0070.00018.10
8.1.170.0030.00618.57
8.1.160.0000.00721.97
8.1.150.0040.00418.87
8.1.140.0060.00317.42
8.1.130.0050.00517.66
8.1.120.0040.00417.42
8.1.110.0030.00317.42
8.1.100.0000.00817.40
8.1.90.0040.00417.43
8.1.80.0000.00717.36
8.1.70.0030.00317.39
8.1.60.0060.00317.58
8.1.50.0000.00817.51
8.1.40.0040.00417.51
8.1.30.0040.00417.50
8.1.20.0000.00717.60
8.1.10.0040.00417.55
8.1.00.0070.00017.54
8.0.300.0040.00419.84
8.0.290.0020.00516.63
8.0.280.0050.00218.47
8.0.270.0030.00316.88
8.0.260.0030.00317.29
8.0.250.0040.00416.94
8.0.240.0000.00716.86
8.0.230.0000.00716.88
8.0.220.0050.00316.86
8.0.210.0040.00416.73
8.0.200.0000.00816.79
8.0.190.0040.00416.81
8.0.180.0030.00616.76
8.0.170.0080.00016.89
8.0.160.0040.00416.81
8.0.150.0070.00016.68
8.0.140.0020.00516.79
8.0.130.0000.00813.35
8.0.120.0080.00016.77
8.0.110.0000.00716.84
8.0.100.0000.00816.71
8.0.90.0030.00616.76
8.0.80.0030.01216.83
8.0.70.0050.00316.73
8.0.60.0000.00716.71
8.0.50.0030.00516.68
8.0.30.0070.00916.96
8.0.20.0140.00417.43
8.0.10.0000.00716.84
8.0.00.0090.00916.75
7.4.330.0000.00515.08
7.4.320.0000.00616.39
7.4.300.0080.00016.38
7.4.290.0030.00316.43
7.4.280.0040.00416.56
7.4.270.0060.00016.41
7.4.260.0030.00316.34
7.4.250.0000.00716.52
7.4.240.0060.00216.54
7.4.230.0030.00316.65
7.4.220.0110.00616.38
7.4.210.0100.01016.66
7.4.200.0000.00816.38
7.4.160.0060.00916.58
7.4.150.0100.00717.40
7.4.140.0100.01117.86
7.4.130.0080.01016.44
7.4.120.0080.01016.49
7.4.110.0110.01816.29
7.4.100.0150.00416.40
7.4.90.0080.01016.56
7.4.80.0110.00917.33
7.4.70.0080.00916.52
7.4.60.0110.00816.55
7.4.50.0070.01116.48
7.4.40.0160.00416.48
7.4.30.0120.01216.43
7.4.20.0100.00916.44
7.4.10.0070.01116.42
7.4.00.0060.01315.98
7.3.330.0000.00613.19
7.3.320.0000.00713.10
7.3.310.0000.00716.42
7.3.300.0070.00016.33
7.3.290.0050.01116.34
7.3.280.0080.00816.31
7.3.270.0040.02017.40
7.3.260.0130.00816.66
7.3.250.0080.01216.36
7.3.240.0130.01016.69
7.3.230.0080.00816.60
7.3.220.0100.00716.32
7.3.210.0100.01016.39
7.3.200.0100.00816.45
7.3.190.0110.00916.41
7.3.180.0070.01216.43
7.3.170.0150.00716.31
7.3.160.0130.00716.39
7.3.150.0170.00516.44
7.3.140.0050.01416.35
7.3.130.0080.01116.53
7.3.120.0070.01016.46
7.3.110.0100.00916.34
7.3.100.0100.00816.47
7.3.90.0070.01216.53
7.3.80.0140.00616.42
7.3.70.0100.00816.01
7.3.60.0100.00916.03
7.3.50.0090.00815.84
7.3.40.0090.00915.89
7.3.30.0100.00815.99
7.3.20.0130.00915.87
7.3.10.0190.01016.07
7.3.00.0240.00616.00
7.2.330.0120.00616.57
7.2.320.0090.00816.50
7.2.310.0110.01216.44
7.2.300.0110.00816.57
7.2.290.0060.01316.65
7.2.280.0080.00916.49
7.2.270.0080.01116.46
7.2.260.0090.01116.46
7.2.250.0100.01016.50
7.2.240.0100.00916.43
7.2.230.0120.00716.48
7.2.220.0100.00916.56
7.2.210.0100.01016.54
7.2.200.0100.00916.07
7.2.190.0120.00616.06
7.2.180.0060.01116.10
7.2.170.0110.00816.06
7.2.160.0100.00916.12
7.2.150.0120.00816.04
7.2.140.0160.00616.12
7.2.130.0070.01116.21
7.2.120.0070.01016.22
7.2.110.0130.00616.16
7.2.100.0150.00716.33
7.2.90.0110.00916.27
7.2.80.0140.00816.26
7.2.70.0130.01216.31
7.2.60.0090.01116.42
7.2.50.0170.00716.24
7.2.40.0110.00916.26
7.2.30.0140.00916.30
7.2.20.0120.01016.30
7.2.10.0070.01216.26
7.2.00.0150.00716.62
7.1.330.0180.00615.54
7.1.320.0150.01115.47
7.1.310.0160.01115.56
7.1.300.0160.00915.04
7.1.290.0160.01015.19
7.1.280.0180.00615.09
7.1.270.0160.00715.17
7.1.260.0170.00615.18
7.1.250.0170.00715.11
7.1.240.0210.00515.17
7.1.230.0190.00615.16
7.1.220.0200.00515.19
7.1.210.0190.00715.09
7.1.200.0140.01015.26
7.1.190.0340.00915.03
7.1.180.0180.00815.12
7.1.170.0170.00815.12
7.1.160.0170.01115.21
7.1.150.0200.00915.20
7.1.140.0150.01015.27
7.1.130.0170.00715.24
7.1.120.0160.01015.19
7.1.110.0160.00915.37
7.1.100.0190.00815.15
7.1.90.0170.01015.25
7.1.80.0210.00815.25
7.1.70.0140.01115.54
7.1.60.0160.00815.59
7.1.50.0140.01015.58
7.1.40.0160.00915.45
7.1.30.0150.00915.48
7.1.20.0180.00515.54
7.1.10.0200.00815.46
7.1.00.0210.00315.56
7.0.330.0170.00614.77
7.0.320.0160.00714.66
7.0.310.0150.01014.80
7.0.300.0190.00814.85
7.0.290.0140.00814.81
7.0.280.0210.01114.81
7.0.270.0200.00714.82
7.0.260.0190.00614.78
7.0.250.0140.01314.86
7.0.240.0170.00914.89
7.0.230.0240.00714.86
7.0.220.0150.00814.92
7.0.210.0180.00614.88
7.0.200.0220.00615.24
7.0.190.0130.00915.16
7.0.180.0130.00815.15
7.0.170.0130.01115.18
7.0.160.0130.00815.22
7.0.150.0130.00615.13
7.0.140.0140.00715.11
7.0.130.0150.00515.13
7.0.120.0170.00715.21
7.0.110.0130.01015.09
7.0.100.0150.00615.16
7.0.90.0170.00715.13
7.0.80.0150.00615.14
7.0.70.0180.00515.16
7.0.60.0150.00715.11
7.0.50.0180.00915.22
7.0.40.0130.00614.73
7.0.30.0130.00614.81
7.0.20.0150.00614.76
7.0.10.0120.00914.77
7.0.00.0110.00714.76
5.6.400.0140.01015.51
5.6.390.0130.00915.55
5.6.380.0150.00915.16
5.6.370.0170.01215.43
5.6.360.0180.00715.39
5.6.350.0150.01015.26
5.6.340.0150.01115.43
5.6.330.0160.01115.13
5.6.320.0180.00815.31
5.6.310.0150.01115.34
5.6.300.0090.02516.36
5.6.290.0150.01516.26
5.6.280.0160.01216.21
5.6.270.0110.01616.27
5.6.260.0110.01616.28
5.6.250.0130.01416.24
5.6.240.0140.01416.32
5.6.230.0180.01116.25
5.6.220.0140.01516.23
5.6.210.0120.01616.27
5.6.200.0130.02116.24
5.6.190.0140.01416.23
5.6.180.0160.01316.14
5.6.170.0150.01516.22
5.6.160.0130.01616.13
5.6.150.0120.01516.21
5.6.140.0130.01516.26
5.6.130.0140.01416.26
5.6.120.0170.01316.24
5.6.110.0110.01916.12
5.6.100.0130.01316.22
5.6.90.0150.01316.25
5.6.80.0150.01416.10
5.6.70.0140.01516.01
5.6.60.0120.01616.09
5.6.50.0110.01515.97
5.6.40.0120.01515.99
5.6.30.0130.01316.07
5.6.20.0120.01516.05
5.6.10.0120.01516.03
5.6.00.0160.01416.12
5.5.380.0110.01715.38
5.5.370.0130.01415.39
5.5.360.0110.01415.18
5.5.350.0110.01515.32
5.5.340.0150.01215.37
5.5.330.0120.01715.38
5.5.320.0150.01215.29
5.5.310.0120.01515.39
5.5.300.0130.01315.35
5.5.290.0110.01715.49
5.5.280.0150.01415.32
5.5.270.0120.01515.46
5.5.260.0150.01415.34
5.5.250.0120.01615.35
5.5.240.0140.01315.38
5.5.230.0130.01215.30
5.5.220.0110.01515.29
5.5.210.0130.01615.32
5.5.200.0100.01615.31
5.5.190.0100.01615.33
5.5.180.0120.01515.37
5.5.170.0120.01115.13
5.5.160.0130.01415.25
5.5.150.0130.01715.34
5.5.140.0120.02015.25
5.5.130.0120.01315.16
5.5.120.0130.01315.32
5.5.110.0130.01215.23
5.5.100.0090.01615.29
5.5.90.0110.01415.34
5.5.80.0110.01815.22
5.5.70.0110.01415.22
5.5.60.0120.01415.27
5.5.50.0120.01115.16
5.5.40.0140.01215.35
5.5.30.0120.01515.16
5.5.20.0110.01615.31
5.5.10.0120.01515.24
5.5.00.0120.01215.34
5.4.450.0080.01413.86
5.4.440.0140.01113.83
5.4.430.0100.01213.82
5.4.420.0100.01113.84
5.4.410.0090.01313.84
5.4.400.0120.01113.74
5.4.390.0120.01213.71
5.4.380.0100.01413.75
5.4.370.0090.01213.71
5.4.360.0100.01413.73
5.4.350.0060.01313.73
5.4.340.0100.01413.75
5.4.330.0090.00812.65
5.4.320.0110.01013.74
5.4.310.0120.01113.67
5.4.300.0120.01113.81
5.4.290.0100.01113.68
5.4.280.0130.01013.72
5.4.270.0110.01113.80
5.4.260.0120.01013.78
5.4.250.0100.01213.73
5.4.240.0110.01213.75
5.4.230.0080.01413.73
5.4.220.0110.01213.71
5.4.210.0140.01013.80
5.4.200.0110.01213.75
5.4.190.0100.01213.75
5.4.180.0130.00913.74
5.4.170.0090.01313.76
5.4.160.0110.01213.75
5.4.150.0090.01313.66
5.4.140.0090.01213.34
5.4.130.0090.01213.30
5.4.120.0090.01313.33
5.4.110.0090.01113.36
5.4.100.0110.01113.30
5.4.90.0100.01213.37
5.4.80.0100.01213.38
5.4.70.0090.01113.40
5.4.60.0070.01413.40
5.4.50.0080.01513.40
5.4.40.0110.01113.33
5.4.30.0090.01313.33
5.4.20.0100.01213.36
5.4.10.0090.01213.42
5.4.00.0100.01113.29

preferences:
29.79 ms | 403 KiB | 5 Q