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|$)/ims"; $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.0130.01016.75
8.3.50.0090.00616.63
8.3.40.0080.00818.77
8.3.30.0150.00018.84
8.3.20.0070.00021.77
8.3.10.0080.00021.91
8.3.00.0080.00019.66
8.2.180.0090.00617.00
8.2.170.0140.00422.96
8.2.160.0000.01319.30
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0040.00422.20
8.2.120.0030.00526.35
8.2.110.0070.00322.08
8.2.100.0120.00018.03
8.2.90.0030.00519.05
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0030.00617.92
8.2.50.0030.00518.10
8.2.40.0040.00420.59
8.2.30.0000.00719.22
8.2.20.0050.00218.03
8.2.10.0030.00618.03
8.2.00.0000.00817.90
8.1.280.0110.00825.92
8.1.270.0130.00323.92
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0050.00520.89
8.1.230.0120.00418.91
8.1.220.0080.00017.74
8.1.210.0030.00518.77
8.1.200.0030.00617.36
8.1.190.0030.00517.36
8.1.180.0070.00018.10
8.1.170.0040.00418.74
8.1.160.0040.00418.85
8.1.150.0040.00418.75
8.1.140.0070.00019.61
8.1.130.0030.00318.92
8.1.120.0040.00417.45
8.1.110.0000.00817.45
8.1.100.0000.00917.43
8.1.90.0000.00717.48
8.1.80.0040.00417.57
8.1.70.0000.00717.44
8.1.60.0050.00517.70
8.1.50.0080.00017.60
8.1.40.0050.00317.65
8.1.30.0030.00617.68
8.1.20.0050.00317.74
8.1.10.0040.00417.69
8.1.00.0000.00717.50
8.0.300.0000.00718.77
8.0.290.0030.00516.75
8.0.280.0000.00718.32
8.0.270.0030.00317.26
8.0.260.0060.00018.99
8.0.250.0030.00317.07
8.0.240.0000.00817.11
8.0.230.0000.00817.03
8.0.220.0000.00916.86
8.0.210.0040.00416.85
8.0.200.0030.00616.91
8.0.190.0040.00417.06
8.0.180.0040.00417.02
8.0.170.0000.00716.95
8.0.160.0060.00316.99
8.0.150.0040.00416.81
8.0.140.0000.00716.97
8.0.130.0030.00413.39
8.0.120.0050.00216.97
8.0.110.0050.00316.95
8.0.100.0030.00617.09
8.0.90.0000.00817.05
8.0.80.0130.00317.05
8.0.70.0040.00416.86
8.0.60.0000.00717.02
8.0.50.0070.00017.02
8.0.30.0080.01117.21
8.0.20.0180.02117.40
8.0.10.0080.00017.18
8.0.00.0130.01016.91
7.4.330.0070.00015.55
7.4.320.0030.00316.55
7.4.300.0000.00716.74
7.4.290.0050.00516.59
7.4.280.0040.00416.64
7.4.270.0000.00716.76
7.4.260.0000.00816.75
7.4.250.0040.00416.61
7.4.240.0000.00716.56
7.4.230.0040.00416.84
7.4.220.0120.00616.77
7.4.210.0060.00916.82
7.4.200.0040.00416.83
7.4.160.0070.01016.62
7.4.150.0120.00917.40
7.4.140.0130.01117.86
7.4.130.0120.01016.71
7.4.120.0150.00716.73
7.4.110.0080.00816.56
7.4.100.0060.01316.79
7.4.90.0060.01316.62
7.4.80.0100.00719.39
7.4.70.0100.01016.73
7.4.60.0060.00916.77
7.4.50.0040.00816.56
7.4.40.0130.00316.56
7.4.30.0060.01516.70
7.4.10.0040.01515.13
7.4.00.0070.00914.95
7.3.330.0030.00313.11
7.3.320.0020.00213.13
7.3.310.0020.00516.26
7.3.300.0030.00316.12
7.3.290.0090.00716.29
7.3.280.0060.01016.27
7.3.270.0090.01117.40
7.3.260.0100.00916.45
7.3.250.0110.00816.31
7.3.240.0130.00716.36
7.3.230.0120.00616.71
7.3.210.0030.01516.49
7.3.200.0100.01016.32
7.3.190.0150.00616.34
7.3.180.0090.00816.24
7.3.170.0090.01016.69
7.3.160.0040.01216.47
7.3.130.0090.00914.84
7.3.120.0060.01114.80
7.3.110.0080.00714.78
7.3.100.0070.00914.83
7.3.90.0040.01215.13
7.3.80.0060.00914.72
7.3.70.0050.00914.83
7.3.60.0060.00914.81
7.3.50.0050.00814.79
7.3.40.0080.00514.77
7.3.30.0070.00814.76
7.3.20.0050.01016.73
7.3.10.0100.00816.58
7.3.00.0100.00816.55
7.2.330.0140.00616.43
7.2.320.0170.00716.51
7.2.310.0120.01116.47
7.2.300.0050.01416.64
7.2.290.0100.01316.50
7.2.260.0100.01015.14
7.2.250.0100.00814.96
7.2.240.0080.01015.06
7.2.230.0050.01015.12
7.2.220.0060.00715.06
7.2.210.0050.01114.79
7.2.200.0040.01014.93
7.2.190.0070.00814.94
7.2.180.0050.00615.12
7.2.170.0070.00714.88
7.2.160.0130.00014.96
7.2.150.0100.01017.06
7.2.140.0060.01316.94
7.2.130.0100.01016.71
7.2.120.0110.00816.82
7.2.110.0110.00816.61
7.2.100.0080.01016.58
7.2.90.0110.00716.82
7.2.80.0100.01016.75
7.2.70.0170.00716.94
7.2.60.0110.00916.82
7.2.50.0110.01116.77
7.2.40.0150.00516.77
7.2.30.0110.00816.60
7.2.20.0110.00916.61
7.2.10.0070.00816.68
7.2.00.0090.01117.85
7.1.330.0080.00515.73
7.1.320.0080.00615.88
7.1.310.0090.00315.68
7.1.300.0060.00815.94
7.1.290.0080.00415.81
7.1.280.0060.00715.74
7.1.270.0060.00915.91
7.1.260.0070.00715.86
7.1.250.0160.00315.56
7.1.240.0070.00715.89
7.1.230.0040.00415.91
7.1.220.0070.01115.82
7.1.210.0070.00715.89
7.1.200.0030.01115.83
7.1.190.0100.00715.57
7.1.180.0070.00615.80
7.1.170.0100.00315.88
7.1.160.0070.00715.85
7.1.150.0030.00615.80
7.1.140.0030.00615.57
7.1.130.0080.00415.88
7.1.120.0000.01415.94
7.1.110.0090.00615.94
7.1.100.0090.00315.79
7.1.90.0000.01315.81
7.1.80.0030.01315.86
7.1.70.0030.00716.77
7.1.60.0020.01116.66
7.1.50.0140.00928.47
7.1.40.0170.01025.02
7.1.30.0120.01125.39
7.1.20.0130.00825.26
7.1.10.0070.00816.31
7.1.00.0060.00716.18
7.0.330.0100.00715.15
7.0.320.0110.00415.51
7.0.310.0000.01415.48
7.0.300.0060.00315.23
7.0.290.0000.00915.46
7.0.280.0030.01315.59
7.0.270.0060.00915.50
7.0.260.0090.00615.36
7.0.250.0070.00715.26
7.0.240.0070.00315.55
7.0.230.0040.01115.82
7.0.220.0030.01015.63
7.0.210.0030.00915.75
7.0.200.0050.01115.90
7.0.190.0030.01016.05
7.0.180.0030.01215.81
7.0.170.0050.01115.95
7.0.160.0040.01215.99
7.0.150.0050.01115.79
7.0.140.0030.01215.95
7.0.130.0080.00715.88
7.0.120.0070.00715.96
7.0.110.0080.00715.97
7.0.100.0080.00515.95
7.0.90.0080.00715.90
7.0.80.0050.00915.83
7.0.70.0030.01015.89
7.0.60.0020.01215.93
7.0.50.0050.00816.13
7.0.40.0060.01015.12
7.0.30.0080.00815.13
7.0.20.0060.00314.92
7.0.10.0000.01215.01
7.0.00.0050.00815.16
5.6.400.0000.01314.20
5.6.390.0030.01414.25
5.6.380.0030.01014.07
5.6.370.0040.00814.23
5.6.360.0060.00314.37
5.6.350.0000.00814.49
5.6.340.0030.00614.28
5.6.330.0040.01114.27
5.6.320.0000.01614.21
5.6.310.0030.01214.40
5.6.300.0100.00613.93
5.6.290.0070.01114.05
5.6.280.0080.00814.19
5.6.270.0030.00914.50
5.6.260.0070.01014.09
5.6.250.0030.01414.00
5.6.240.0070.01014.42
5.6.230.0060.00614.26
5.6.220.0030.00614.49
5.6.210.0100.00714.37
5.6.200.0070.00714.07
5.6.190.0030.01314.17
5.6.180.0110.00014.38
5.6.170.0100.00314.37
5.6.160.0070.00314.04
5.6.150.0120.00614.33
5.6.140.0060.01314.57
5.6.130.0100.01014.36
5.6.120.0030.00914.29
5.6.110.0040.00714.02
5.6.100.0030.01314.26
5.6.90.0150.00314.28
5.6.80.0130.00714.28
5.6.70.0110.00314.11
5.6.60.0070.00714.05
5.6.50.0060.00914.20
5.6.40.0000.01614.35
5.6.30.0100.00614.29
5.6.20.0000.01514.20
5.6.10.0000.01114.08
5.6.00.0120.00314.32

preferences:
47.94 ms | 400 KiB | 5 Q