3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isset($_POST['f__ves']) and isset($_POST['f__material'])) { $get_ves = $_POST['f__ves']; $get_material = $_POST['f__material']; foreach ($get_ves as $get_ves_item) { foreach ($get_material as $get_ves_item) { foreach ($product_id_arr as $prod_id) { $prod_get_attr = "SELECT * FROM `oc_product_attribute` WHERE (product_id, attribute_id, text) in( ('" . $prod_id . "', 28, '" . $get_ves_item . "'), ('" . $prod_id . "', 29, '" . $get_materail_item . "') )"; $query_prod_get_attr = mysqli_query($dbh, $prod_get_attr); foreach ($query_prod_get_attr as $product_id) { $product_val[] = $product_id['product_id']; } } } var_dump($product_val); } }
Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3

preferences:
117.87 ms | 1457 KiB | 4 Q