3v4l.org

run code in 300+ PHP versions simultaneously
<?php function contains($start, $end, $check) { return $check > $start && $check < $end; } function overlap($a, $b) { return contains($a[0], $a[1], $b[0]) || contains($a[0], $a[1], $b[1]); } function checkListForOverlaps($list) { for($i=0,$c=count($list); $i<$c; ++$i) { for($j=$i+1; $j<$c; ++$j) { if( overlap($list[$i], $list[$j]) ) { printf("%s and %s overlap\n", json_encode($list[$i]), json_encode($list[$j])); } } } } $input = [[1, 3],[3, 7],[9,INF], [2, 5]]; checkListForOverlaps($input);

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.0070.01018.31
8.3.50.0090.00619.77
8.3.40.0080.00818.79
8.3.30.0150.00018.80
8.3.20.0070.01023.66
8.3.10.0050.00323.36
8.3.00.0100.00723.66
8.2.180.0120.00918.29
8.2.170.0090.00922.96
8.2.160.0060.00922.09
8.2.150.0140.00424.18
8.2.140.0100.00724.66
8.2.130.0040.00426.16
8.2.120.0030.00519.48
8.2.110.0070.01420.90
8.2.100.0110.00418.03
8.2.90.0000.00817.97
8.2.80.0040.00417.97
8.2.70.0060.00317.38
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0030.00519.95
8.2.30.0040.00418.00
8.2.20.0070.00018.18
8.2.10.0080.00020.49
8.2.00.0040.00419.41
8.1.280.0100.01025.92
8.1.270.0090.00619.00
8.1.260.0100.00326.35
8.1.250.0140.00328.09
8.1.240.0100.00022.61
8.1.230.0060.00620.81
8.1.220.0060.00317.79
8.1.210.0000.00818.96
8.1.200.0030.00617.23
8.1.190.0030.00917.36
8.1.180.0040.00418.10
8.1.170.0040.00418.72
8.1.160.0040.00418.89
8.1.150.0070.00020.73
8.1.140.0050.00222.15
8.1.130.0030.00520.18
8.1.120.0040.00417.41
8.1.110.0040.00717.36
8.1.100.0110.00017.54
8.1.90.0000.00717.37
8.1.80.0050.00317.47
8.1.70.0000.00717.39
8.1.60.0030.00617.48
8.1.50.0070.00317.42
8.1.40.0090.00017.50
8.1.30.0090.00017.55
8.1.20.0040.00417.63
8.1.10.0050.00317.47
8.1.00.0040.00417.46
8.0.300.0040.00420.02
8.0.290.0110.00016.63
8.0.280.0040.00418.50
8.0.270.0030.00317.26
8.0.260.0030.00320.24
8.0.250.0070.00017.00
8.0.240.0000.00716.91
8.0.230.0050.00316.95
8.0.220.0040.00416.91
8.0.210.0000.00716.88
8.0.200.0000.00716.82
8.0.190.0040.00416.94
8.0.180.0040.00416.88
8.0.170.0060.00316.89
8.0.160.0040.00416.79
8.0.150.0070.00016.79
8.0.140.0000.00716.75
8.0.130.0000.00513.32
8.0.120.0040.00416.87
8.0.110.0030.00516.82
8.0.100.0030.00516.86
8.0.90.0050.00216.89
8.0.80.0090.00816.89
8.0.70.0070.00016.75
8.0.60.0080.00016.71
8.0.50.0050.00316.78
8.0.30.0120.00617.25
8.0.20.0120.00717.40
8.0.10.0040.00416.81
8.0.00.0120.00716.72
7.4.330.0020.00216.67
7.4.320.0050.00216.65
7.4.300.0000.00616.45
7.4.290.0030.00316.55
7.4.280.0030.00316.52
7.4.270.0040.00416.51
7.4.260.0030.00316.42
7.4.250.0050.00316.59
7.4.240.0040.00416.51
7.4.230.0040.00416.46
7.4.220.0030.00316.39
7.4.210.0040.00916.59
7.4.200.0040.00416.63
7.4.160.0100.00716.62
7.4.140.0100.00717.86
7.4.130.0100.00716.62
7.4.120.0060.01216.44
7.4.110.0090.00916.42
7.4.100.0090.01516.47
7.4.90.0170.00016.43
7.4.80.0080.00919.39
7.4.70.0060.01016.55
7.4.60.0030.01216.56
7.4.50.0100.00316.39
7.4.40.0090.01216.61
7.4.00.0030.01014.79
7.3.330.0030.00313.30
7.3.320.0000.00613.38
7.3.310.0000.00716.23
7.3.300.0030.00316.38
7.3.290.0000.00716.27
7.3.280.0090.00716.24
7.3.260.0100.00916.43
7.3.240.0130.00616.47
7.3.230.0060.01016.29
7.3.210.0030.01316.36
7.3.200.0100.01316.65
7.3.190.0130.00316.41
7.3.180.0070.01016.32
7.3.170.0070.01016.38
7.3.160.0100.00716.36
7.3.00.1460.00714.51
7.2.330.0070.01716.83
7.2.320.0030.01816.73
7.2.310.0100.00716.63
7.2.300.0030.01316.69
7.2.290.0130.00316.54
7.2.130.2190.00714.64
7.2.120.1570.00514.66
7.2.110.2180.00314.72
7.2.100.2360.01214.42
7.2.90.1950.01014.53
7.2.80.2150.00814.69
7.2.70.1810.00714.77
7.2.60.2420.00514.68
7.2.50.2760.00414.70
7.2.40.2740.01014.70
7.2.30.2760.00714.72
7.2.20.2170.00514.81
7.2.10.2450.01014.56
7.2.00.3070.00714.92
7.1.250.2460.01013.97
7.0.330.1820.00513.44
5.6.380.0090.00713.93

preferences:
61.14 ms | 400 KiB | 5 Q