3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(isset($_POST["enviar"])){ foreach($_POST["checkbox"] as $key=>$value){ echo $id_produtos = mysql_real_escape_string($value); echo $nome = $_POST['nome'][$key]; echo $valor = $_POST['valor'][$key]; } }
Output for 5.4.2 - 5.4.45, 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.29, 7.4.0 - 7.4.21, 8.0.0 - 8.0.8

preferences:
104.58 ms | 460 KiB | 5 Q