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|$)/m"; $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, PREG_SET_ORDER); 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.0140.00716.88
8.3.50.0110.00716.49
8.3.40.0070.01118.57
8.3.30.0000.01518.86
8.3.20.0070.00021.89
8.3.10.0080.00021.89
8.3.00.0000.00819.43
8.2.180.0140.00016.63
8.2.170.0090.00622.96
8.2.160.0100.00319.34
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0040.00420.43
8.2.120.0000.00826.35
8.2.110.0090.00022.33
8.2.100.0000.01217.79
8.2.90.0000.00818.03
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0030.00517.80
8.2.50.0040.00418.10
8.2.40.0080.00020.43
8.2.30.0030.00619.27
8.2.20.0080.00018.02
8.2.10.0000.00717.93
8.2.00.0040.00418.09
8.1.280.0130.00325.92
8.1.270.0000.00823.96
8.1.260.0080.00026.35
8.1.250.0000.00928.09
8.1.240.0060.00323.98
8.1.230.0040.00720.91
8.1.220.0050.00317.74
8.1.210.0000.00818.85
8.1.200.0040.00417.48
8.1.190.0000.00917.35
8.1.180.0000.00818.10
8.1.170.0040.00418.68
8.1.160.0000.00718.84
8.1.150.0040.00418.74
8.1.140.0040.00419.46
8.1.130.0030.00318.91
8.1.120.0000.00717.58
8.1.110.0050.00217.57
8.1.100.0000.00717.39
8.1.90.0020.00517.48
8.1.80.0030.00517.56
8.1.70.0000.00917.59
8.1.60.0000.00717.65
8.1.50.0080.00017.51
8.1.40.0050.00217.57
8.1.30.0050.00317.77
8.1.20.0040.00417.76
8.1.10.0040.00417.63
8.1.00.0040.00417.59
8.0.300.0040.00421.95
8.0.290.0040.00416.63
8.0.280.0030.00318.39
8.0.270.0000.00717.14
8.0.260.0030.00318.98
8.0.250.0030.00516.92
8.0.240.0000.00917.03
8.0.230.0000.00717.02
8.0.220.0040.00416.90
8.0.210.0040.00417.00
8.0.200.0030.00317.00
8.0.190.0000.00916.95
8.0.180.0000.00816.89
8.0.170.0000.00716.89
8.0.160.0000.00816.98
8.0.150.0070.00016.78
8.0.140.0050.00216.95
8.0.130.0000.00813.36
8.0.120.0000.00816.88
8.0.110.0000.00816.90
8.0.100.0030.00617.04
8.0.90.0040.00416.97
8.0.80.0040.01217.02
8.0.70.0050.00317.04
8.0.60.0000.00716.97
8.0.50.0040.00416.95
8.0.30.0090.00817.24
8.0.20.0110.01217.40
8.0.10.0040.00416.96
8.0.00.0070.01116.73
7.4.330.0070.00015.55
7.4.320.0040.00416.59
7.4.300.0030.00316.76
7.4.290.0000.00816.68
7.4.280.0000.00816.73
7.4.270.0000.00816.56
7.4.260.0030.00716.68
7.4.250.0000.00716.46
7.4.240.0070.00016.67
7.4.230.0000.00816.50
7.4.220.0120.00616.64
7.4.210.0100.00716.75
7.4.200.0050.00316.82
7.4.160.0100.00816.53
7.4.150.0110.01117.40
7.4.140.0180.01417.86
7.4.130.0150.00716.58
7.4.120.0130.01116.67
7.4.110.0110.00816.50
7.4.100.0080.01116.63
7.4.90.0140.00316.46
7.4.80.0130.00419.39
7.4.70.0090.00916.53
7.4.60.0100.00716.53
7.4.50.0070.01016.65
7.4.40.0030.01416.63
7.4.30.0130.00316.57
7.4.00.0100.00315.00
7.3.330.0000.00513.01
7.3.320.0030.00313.19
7.3.310.0000.00716.25
7.3.300.0030.00316.19
7.3.290.0070.00916.29
7.3.280.0070.00916.27
7.3.270.0090.00917.40
7.3.260.0170.00716.50
7.3.250.0080.01116.45
7.3.240.0140.00816.59
7.3.230.0100.01016.63
7.3.210.0150.00416.47
7.3.200.0130.00316.50
7.3.190.0030.01316.41
7.3.180.0060.01016.41
7.3.170.0120.00616.45
7.3.160.0090.00616.56
7.2.330.0110.00816.70
7.2.320.0140.00616.75
7.2.310.0090.00916.64
7.2.300.0070.01716.77
7.2.290.0100.00716.45
7.2.110.0130.00016.56
7.2.60.0040.01116.93
7.1.200.0070.00015.77
7.1.70.0070.00717.28
7.1.60.0110.00017.45
7.1.50.0430.01332.92
7.1.40.0370.01032.70
7.1.30.0470.00732.63
7.1.20.0400.01732.63
7.1.10.0300.01314.87
7.1.00.0270.01014.89
7.0.200.0080.00816.71
7.0.190.0370.00714.75
7.0.180.0230.01014.59
7.0.170.0430.00714.47
7.0.160.0430.00314.46
7.0.150.0330.00014.48
7.0.140.0270.01314.53
7.0.130.0900.01314.64
7.0.120.0330.01014.71
7.0.110.0300.00714.59
7.0.100.0300.00714.53
7.0.90.0300.00314.49
7.0.80.0230.01314.50
7.0.70.0270.01014.52
7.0.60.0270.00714.27
7.0.50.0270.00714.48
7.0.40.0330.01014.64
7.0.30.0270.01014.73
7.0.20.0330.00314.69
7.0.10.0300.01714.58
7.0.00.0230.00714.56

preferences:
96.03 ms | 401 KiB | 5 Q