3v4l.org

run code in 300+ PHP versions simultaneously
<?php $idx = [[1,10],[2,4],[3,5]]; $x = array_column($idx,0); $y = array_column($idx,1); $string_y = ''; $string_x = ''; if(count($x) == count($y)){ $i = 0; foreach($x as $key => $value){ if ($key === array_key_last($x)) { $string_y .= $y[$key]; $string_x .= $x[$key]; }else{ $string_y .= $y[$key] . ','; $string_x .= $x[$key] . ','; } } $sql = "SELECT id, b1, b2 FROM dlt WHERE b1 IN ($string_x) AND b2 IN ($string_y) ORDER BY id DESC LIMIT 1"; echo $sql; }

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.4.120.0110.00820.49
8.4.110.0100.01022.65
8.4.100.0040.00517.77
8.4.90.0100.00618.79
8.4.80.0140.00717.84
8.4.70.0090.00617.99
8.4.60.0090.00718.68
8.4.50.0040.00520.29
8.4.40.0090.01219.63
8.4.30.0030.01320.16
8.4.20.0000.00819.35
8.4.10.0090.00320.46
8.3.250.0100.00918.91
8.3.240.0090.00516.74
8.3.230.0120.00716.47
8.3.220.0050.00317.06
8.3.210.0100.00816.65
8.3.200.0040.00816.57
8.3.190.0120.00617.36
8.3.180.0100.01017.20
8.3.170.0090.00920.68
8.3.160.0110.00317.04
8.3.150.0060.01217.11
8.3.140.0120.00616.73
8.3.130.0080.00316.64
8.3.120.0000.00920.82
8.3.110.0030.00620.94
8.3.100.0140.00416.61
8.3.90.0080.00026.77
8.3.80.0090.00016.63
8.3.70.0070.01416.58
8.3.60.0100.00716.63
8.3.50.0180.00320.16
8.3.40.0150.00019.09
8.3.30.0000.01519.47
8.3.20.0080.00024.18
8.3.10.0000.00724.66
8.3.00.0000.00826.16
8.2.290.0100.00920.41
8.2.280.0110.00918.39
8.2.270.0060.01317.14
8.2.260.0040.01416.61
8.2.250.0140.00516.98
8.2.240.0110.00718.81
8.2.230.0030.00622.58
8.2.220.0100.01024.06
8.2.210.0000.01426.77
8.2.200.0080.00016.50
8.2.190.0170.00318.18
8.2.180.0120.00625.92
8.2.170.0130.00719.02
8.2.160.0100.01022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0040.00420.97
8.2.110.0030.00620.22
8.2.100.0090.00020.37
8.1.330.0120.00622.21
8.1.320.0140.00516.13
8.1.310.0000.00816.85
8.1.300.0070.00715.98
8.1.290.0040.00430.84
8.1.280.0120.00325.92
8.1.270.0000.00723.99
8.1.260.0030.00626.35
8.1.250.0000.00928.09
8.1.240.0060.00318.48
8.1.230.0080.00319.00
7.4.280.0060.00816.59

preferences:
27.37 ms | 403 KiB | 5 Q