3v4l.org

run code in 300+ PHP versions simultaneously
<?php $query = "SELECT TABLE FROM FZC WHERE TABLE='chandz' AND TABLE=1 OR DIE='52'"; $strpos_where = strpos($query, 'WHERE') + 6; $strpos_limit = (int) strpos($query, 'LIMIT'); $strpos_group = (int) strpos($query, 'GROUP BY'); $strpos_order = (int) strpos($query, 'ORDER BY'); if($strpos_limit > 0 AND $strpos_limit > $strpos_group AND $strpos_limit > $strpos_order) { $where = substr($query, $strpos_where, $strpos_limit); } elseif($strpos_group > 0 AND $strpos_group > $strpos_limit AND $strpos_group > $strpos_order) { $where = substr($query, $strpos_where, $strpos_group); } elseif($strpos_order > 0 AND $strpos_order > $strpos_limit AND $strpos_order > $strpos_group) { $where = substr($query, $strpos_where, $strpos_order); } else { $where = substr($query, $strpos_where); } $new_query = substr($query, 0, $strpos_where); $where_built = ""; $where_values = array(); $where_break = explode(' AND ', $where); $where_break_c = count($where_break); for($i = 0; $i < $where_break_c; $i++) { if(!isset($where_break[$i])) { continue; } $clausel = $where_break[$i]; if(isset($where_break[$i + 1]) AND preg_match('/([\`a-z0-9\_\-]+)[\s]{0,1}(\=|LIKE|\<|\>|\<\=|\>\=|!\=)[\s]{0,1}(.*)/i', $where_break[$i + 1]) != 1) { $where_break[$i] = $where_break[$i]." AND ".$where_break[$i + 1]; $clausel = $where_break[$i]; unset($where_break[$i + 1]); } $where_break_or = explode(' OR ', $clausel); $where_break_or_c = count($where_break_or); for($j = 0; $j < $where_break_or_c; $j++) { if(!isset($where_break_or[$i])) { continue; } $clausel2 = $where_break_or[$j]; if(isset($where_break_or[$j + 1]) AND preg_match('/([\`a-z0-9\_\-]+)[\s]{0,1}(\=|LIKE|\<|\>|\<\=|\>\=|!\=)[\s]{0,1}(.*)/i', $where_break_or[$j + 1]) != 1) { $where_break_or[$j] = $where_break_or[$j]." OR ".$where_break_or[$j + 1]; $clausel2 = $where_break_or[$j]; unset($where_break_or[$j + 1]); } preg_match('/([\`a-z0-9\_\-]+)[\s]{0,1}(\=|LIKE|\<|\>|\<\=|\>\=|!\=)[\s]{0,1}(.*)/i', $clausel2, $matches); var_dump($matches); } preg_match('/([\`a-z0-9\_\-]+)[\s]{0,1}(\=|LIKE|\<|\>|\<\=|\>\=|!\=)[\s]{0,1}(.*)/i', $clausel, $matches); var_dump($matches); }

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.00718.81
8.3.50.0100.01322.11
8.3.40.0120.00319.10
8.3.30.0030.01318.84
8.3.20.0050.00320.21
8.3.10.0100.00020.65
8.3.00.0060.00321.60
8.2.180.0160.00616.63
8.2.170.0090.00622.96
8.2.160.0140.00019.41
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00421.15
8.2.120.0040.00426.35
8.2.110.0060.00319.19
8.2.100.0060.00618.05
8.2.90.0060.00319.14
8.2.80.0040.00417.97
8.2.70.0030.00617.75
8.2.60.0050.00317.80
8.2.50.0080.00018.09
8.2.40.0040.00420.45
8.2.30.0040.00419.63
8.2.20.0040.00417.93
8.2.10.0040.00418.12
8.2.00.0000.00918.15
8.1.280.0090.00625.92
8.1.270.0050.00322.11
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0030.00622.55
8.1.230.0000.01117.83
8.1.220.0040.00417.89
8.1.210.0080.00318.77
8.1.200.0000.01017.48
8.1.190.0030.00517.48
8.1.180.0000.00818.10
8.1.170.0000.01018.90
8.1.160.0000.00820.74
8.1.150.0020.00518.90
8.1.140.0030.00619.52
8.1.130.0040.00417.70
8.1.120.0000.00817.65
8.1.110.0040.00417.61
8.1.100.0040.00417.63
8.1.90.0000.00817.55
8.1.80.0040.00417.67
8.1.70.0040.00417.64
8.1.60.0060.00617.65
8.1.50.0040.00417.64
8.1.40.0060.00317.58
8.1.30.0030.00617.77
8.1.20.0000.00817.71
8.1.10.0030.00617.68
8.1.00.0000.00817.71
8.0.300.0000.00918.77
8.0.290.0040.00417.00
8.0.280.0040.00418.51
8.0.270.0070.00017.25
8.0.260.0000.00717.23
8.0.250.0070.00017.03
8.0.240.0000.00717.05
8.0.230.0040.00417.11
8.0.220.0050.00317.11
8.0.210.0080.00017.07
8.0.200.0030.00317.17
8.0.190.0030.00617.07
8.0.180.0040.00417.11
8.0.170.0080.00017.04
8.0.160.0050.00217.09
8.0.150.0000.00816.99
8.0.140.0040.00416.98
8.0.130.0060.00013.50
8.0.120.0050.00317.08
8.0.110.0080.00016.95
8.0.100.0050.00316.96
8.0.90.0040.00417.13
8.0.80.0070.01017.08
8.0.70.0080.00017.09
8.0.60.0050.00316.93
8.0.50.0000.00817.03
8.0.30.0060.01317.21
8.0.20.0150.00417.41
8.0.10.0080.00017.03
8.0.00.0100.01117.09
7.4.330.0000.00616.87
7.4.320.0060.00016.66
7.4.300.0040.00416.89
7.4.290.0040.00416.77
7.4.280.0030.00616.65
7.4.270.0000.00816.75
7.4.260.0090.00316.77
7.4.250.0040.00416.71
7.4.240.0040.00416.88
7.4.230.0040.00416.94
7.4.220.0040.01116.74
7.4.210.0100.01016.73
7.4.200.0030.00316.64
7.4.160.0110.00616.58
7.4.150.0130.00617.40
7.4.140.0110.01117.86
7.4.130.0040.01416.71
7.4.120.0100.01016.84
7.4.110.0000.01916.81
7.4.100.0200.00316.60
7.4.90.0060.01316.66
7.4.80.0100.01019.39
7.4.70.0130.00617.02
7.4.60.0090.00916.86
7.4.50.0040.01216.74
7.4.40.0100.01016.57
7.4.30.0040.01316.87
7.4.10.0110.00815.12
7.4.00.0060.01115.16
7.3.330.0060.00013.34
7.3.320.0030.00313.20
7.3.310.0030.00316.45
7.3.300.0000.00716.48
7.3.290.0000.00816.45
7.3.280.0100.00916.44
7.3.270.0120.00617.40
7.3.260.0080.01116.45
7.3.250.0080.01016.63
7.3.240.0130.00516.67
7.3.230.0070.01016.68
7.3.210.0090.00916.45
7.3.200.0090.00916.91
7.3.190.0080.00816.72
7.3.180.0080.00816.68
7.3.170.0130.00416.80
7.3.160.0100.00616.81
7.3.130.0110.00314.95
7.3.120.0080.01115.06
7.3.110.0070.01115.17
7.3.100.0080.00815.21
7.3.90.0070.00815.17
7.3.80.0070.00915.23
7.3.70.0090.00614.93
7.3.60.0040.01214.90
7.3.50.0070.00515.10
7.3.40.0090.00615.05
7.3.30.0030.01214.90
7.3.20.0090.00516.96
7.3.10.0070.00716.80
7.3.00.0090.00716.98
7.2.330.0100.01016.96
7.2.320.0100.01316.75
7.2.310.0080.01616.91
7.2.300.0030.01616.73
7.2.290.0100.00617.05
7.2.260.0070.01215.13
7.2.250.0090.00815.33
7.2.240.0080.01015.34
7.2.230.0040.01215.21
7.2.220.0050.01015.01
7.2.210.0020.01315.38
7.2.200.0030.01415.10
7.2.190.0050.00915.16
7.2.180.0080.00515.10
7.2.170.0050.01115.32
7.2.160.0110.00915.23
7.2.150.0050.01217.07
7.2.140.0110.00517.01
7.2.130.0040.01016.99
7.2.120.0110.00517.08
7.2.110.0050.00917.13
7.2.100.0020.01517.06
7.2.90.0060.00917.19
7.2.80.0080.00916.94
7.2.70.0020.01217.09
7.2.60.0050.01017.20
7.2.50.0060.01017.19
7.2.40.0050.01217.04
7.2.30.0040.01117.16
7.2.20.0060.00817.07
7.2.10.0070.01016.95
7.2.00.0070.00417.88
7.1.330.0050.01015.96
7.1.320.0060.00815.96
7.1.310.0070.01016.09
7.1.300.0080.00716.00
7.1.290.0090.00515.93
7.1.280.0080.00515.99
7.1.270.0090.00715.88
7.1.260.0030.01015.96
7.1.250.0080.00415.87
7.1.240.0050.00816.14
7.1.230.0060.01015.93
7.1.220.0000.00916.05
7.1.210.0060.00515.83
7.1.200.0090.00815.96
7.1.190.0030.00816.02
7.1.180.0050.00515.96
7.1.170.0070.01016.02
7.1.160.0100.00515.93
7.1.150.0060.00615.90
7.1.140.0100.00616.12
7.1.130.0070.00515.87
7.1.120.0060.00616.02
7.1.110.0040.00515.97
7.1.100.0050.00816.75
7.1.90.0050.01016.03
7.1.80.0040.01115.88
7.1.70.0060.00716.48
7.1.60.0090.00717.04
7.1.50.0080.00916.30
7.1.40.0060.00916.09
7.1.30.0060.00616.06
7.1.20.0080.00515.82
7.1.10.0090.00315.92
7.1.00.0080.02718.04
7.0.330.0070.00715.58
7.0.320.0020.01415.55
7.0.310.0020.01115.57
7.0.300.0090.00715.59
7.0.290.0060.00815.20
7.0.280.0080.00415.61
7.0.270.0050.00815.74
7.0.260.0070.00715.52
7.0.250.0050.00615.62
7.0.240.0090.00515.65
7.0.230.0070.00515.71
7.0.220.0080.00815.62
7.0.210.0060.00615.67
7.0.200.0110.00815.37
7.0.190.0050.00615.53
7.0.180.0110.00315.66
7.0.170.0080.00515.62
7.0.160.0060.00615.50
7.0.150.0050.00715.60
7.0.140.0030.00915.62
7.0.130.0040.00915.59
7.0.120.0020.00615.71
7.0.110.0030.00815.59
7.0.100.0070.00615.48
7.0.90.0030.00715.57
7.0.80.0080.00315.39
7.0.70.0020.01015.54
7.0.60.0110.02517.04
7.0.50.0030.01816.45
7.0.40.0040.02215.74
7.0.30.0080.02015.78
7.0.20.0130.02115.78
7.0.10.0040.01915.69
7.0.00.0070.03215.72
5.6.400.0080.00914.36
5.6.390.0030.00714.77
5.6.380.0060.00714.48
5.6.370.0030.01014.42
5.6.360.0070.00814.66
5.6.350.0100.00414.22
5.6.340.0020.01114.45
5.6.330.0100.00314.47
5.6.320.0000.01114.40
5.6.310.0040.01114.59
5.6.300.0040.00614.33
5.6.290.0060.00614.42
5.6.280.0050.02016.69
5.6.270.0030.00614.35
5.6.260.0080.00614.37
5.6.250.0090.00314.44
5.6.240.0030.00714.60
5.6.230.0100.00314.46
5.6.220.0090.00614.33
5.6.210.0100.02716.46
5.6.200.0030.02215.73
5.6.190.0080.01716.36
5.6.180.0080.02016.48
5.6.170.0090.02016.28
5.6.160.0070.03316.51
5.6.150.0090.01515.82
5.6.140.0050.01915.83
5.6.130.0060.01715.76
5.6.120.0070.02916.54
5.6.110.0090.01816.81
5.6.100.0110.02916.54
5.6.90.0110.02316.75
5.6.80.0070.02816.40
5.6.70.0070.00814.23
5.6.60.0030.00714.26
5.6.50.0050.00514.37
5.6.40.0060.00314.31
5.6.30.0030.00914.48
5.6.20.0050.00614.46
5.6.10.0040.01114.19
5.6.00.0050.00814.43
5.5.380.0030.01014.32
5.5.370.0070.00814.32
5.5.360.0030.01014.41
5.5.350.0110.03316.36
5.5.340.0070.01815.60
5.5.330.0050.01616.42
5.5.320.0130.02016.37
5.5.310.0140.02716.28
5.5.300.0100.02115.73
5.5.290.0060.03115.61
5.5.280.0070.03316.62
5.5.270.0070.02516.47
5.5.260.0050.02316.44
5.5.250.0040.02516.45
5.5.240.0040.01816.27
5.5.230.0090.00614.23
5.5.220.0030.00914.05
5.5.210.0040.01114.35
5.5.200.0070.00714.24
5.5.190.0050.00814.35
5.5.180.0090.00314.38
5.5.170.0000.01314.30
5.5.160.0100.00314.37
5.5.150.0070.00314.07
5.5.140.0060.00714.40
5.5.130.0050.00814.43
5.5.120.0060.00814.16
5.5.110.0080.00614.37
5.5.100.0050.00614.44
5.5.90.0050.00914.25
5.5.80.0030.01114.25
5.5.70.0020.01214.22
5.5.60.0040.00914.29
5.5.50.0050.00714.19
5.5.40.0080.00514.16
5.5.30.0050.00914.50
5.5.20.0030.00814.32
5.5.10.0030.00814.27
5.5.00.0040.01014.29

preferences:
52.86 ms | 401 KiB | 5 Q