3v4l.org

run code in 300+ PHP versions simultaneously
<?php $pattern = "/(SELECT|FROM|WHERE|LEFT JOIN|ORDER BY)(.+?)(?= SELECT|FROM|WHERE|LEFT JOIN|ORDER BY|$)/im"; $sql = "Select id, nome FROM table as t WHERE t.id = 123 LEFT JOIN t2 ON t2.id = t.id ORDER BY t.name "; preg_match_all($pattern, $sql, $arr); var_dump($arr);

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.0160.00616.50
8.3.50.0120.00616.38
8.3.40.0070.01118.84
8.3.30.0040.01118.75
8.3.20.0000.00821.90
8.3.10.0000.01021.87
8.3.00.0080.00019.36
8.2.180.0080.01118.26
8.2.170.0090.00622.96
8.2.160.0100.00319.34
8.2.150.0030.00624.18
8.2.140.0000.00724.66
8.2.130.0000.00822.39
8.2.120.0040.00426.35
8.2.110.0030.00619.33
8.2.100.0090.00317.66
8.2.90.0030.00519.27
8.2.80.0040.00417.97
8.2.70.0030.00517.75
8.2.60.0080.00017.80
8.2.50.0060.00318.07
8.2.40.0080.00018.16
8.2.30.0000.00818.08
8.2.20.0000.00718.09
8.2.10.0000.00818.01
8.2.00.0040.00417.99
8.1.280.0150.00325.92
8.1.270.0050.00323.96
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.60
8.1.230.0060.00619.01
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0060.00317.38
8.1.190.0060.00317.35
8.1.180.0060.00318.10
8.1.170.0030.00518.90
8.1.160.0020.00518.84
8.1.150.0070.00018.73
8.1.140.0060.00319.42
8.1.130.0030.00518.77
8.1.120.0000.00717.58
8.1.110.0000.00817.41
8.1.100.0000.00717.46
8.1.90.0000.00817.49
8.1.80.0040.00417.60
8.1.70.0070.00017.54
8.1.60.0080.00017.72
8.1.50.0050.00317.46
8.1.40.0070.00017.51
8.1.30.0000.00917.84
8.1.20.0040.00417.77
8.1.10.0040.00417.58
8.1.00.0040.00417.66
8.0.300.0000.00918.77
8.0.290.0090.00316.75
8.0.280.0030.00318.40
8.0.270.0070.00017.22
8.0.260.0050.00218.99
8.0.250.0030.00317.00
8.0.240.0040.00417.01
8.0.230.0000.00817.05
8.0.220.0000.00716.94
8.0.210.0020.00517.02
8.0.200.0000.00717.05
8.0.190.0030.00617.00
8.0.180.0000.00717.08
8.0.170.0030.00617.04
8.0.160.0000.00917.02
8.0.150.0000.00716.87
8.0.140.0040.00416.82
8.0.130.0040.00413.49
8.0.120.0080.00016.96
8.0.110.0000.00716.87
8.0.100.0030.00617.02
8.0.90.0040.00416.86
8.0.80.0060.01016.97
8.0.70.0040.00416.88
8.0.60.0000.00716.81
8.0.50.0070.00017.00
8.0.30.0060.01317.19
8.0.20.0110.00817.42
8.0.10.0040.00416.88
8.0.00.0120.00616.84
7.4.330.0030.00315.55
7.4.320.0040.00416.77
7.4.300.0060.00316.59
7.4.290.0060.00316.75
7.4.280.0000.00916.59
7.4.270.0040.00416.63
7.4.260.0030.00616.78
7.4.250.0070.00016.74
7.4.240.0070.00016.75
7.4.230.0000.00716.75
7.4.220.0100.01016.69
7.4.210.0050.01016.70
7.4.200.0040.00416.49
7.4.160.0110.00616.67
7.4.150.0080.01517.40
7.4.140.0110.01317.86
7.4.130.0120.01516.77
7.4.120.0110.01316.72
7.4.110.0080.01116.63
7.4.100.0040.01516.47
7.4.90.0060.01216.71
7.4.80.0060.01719.39
7.4.70.0130.00416.64
7.4.60.0130.00316.46
7.4.50.0030.01316.47
7.4.40.0060.01216.49
7.4.30.0100.00716.63
7.4.00.0060.00915.18
7.3.330.0000.00513.11
7.3.320.0030.00313.01
7.3.310.0000.00716.38
7.3.300.0060.00016.25
7.3.290.0050.01016.29
7.3.280.0080.00916.25
7.3.270.0130.00517.40
7.3.260.0120.00616.54
7.3.250.0120.00616.50
7.3.240.0100.00816.30
7.3.230.0130.00416.29
7.3.210.0100.00716.55
7.3.200.0030.01616.26
7.3.190.0160.00316.54
7.3.180.0110.01116.26
7.3.170.0040.01516.49
7.3.160.0110.00516.35
7.2.330.0140.01116.63
7.2.320.0060.01216.55
7.2.310.0150.00616.61
7.2.300.0120.00616.47
7.2.290.0090.01016.59
7.2.60.0030.01016.79
7.2.00.0040.00819.00
7.1.200.0090.00315.84
7.1.100.0030.01018.50
7.1.70.0040.00717.24
7.1.60.0030.00717.54
7.1.50.0200.00734.83
7.1.40.0170.01034.38
7.1.30.0130.01334.52
7.1.20.0170.00734.64
7.1.10.0070.01016.66
7.1.00.0030.00716.68
7.0.200.0030.00616.80
7.0.190.0030.00716.79
7.0.180.0030.00716.20
7.0.170.0000.01316.29
7.0.160.0030.01316.29
7.0.150.0070.01016.31
7.0.140.0030.00716.38
7.0.130.0000.01016.45
7.0.120.0030.00716.48
7.0.110.0030.00716.34
7.0.100.0030.00716.23
7.0.90.0030.00716.25
7.0.80.0030.00716.14
7.0.70.0000.01016.23
7.0.60.0030.00716.29
7.0.50.0070.00716.40
7.0.40.0000.01016.64
7.0.30.0000.01016.45
7.0.20.0000.01016.46
7.0.10.0070.00716.58
7.0.00.0000.01016.60

preferences:
64.61 ms | 401 KiB | 5 Q