3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $just = 1; do { //it //imagen1 if (isset($_FILES["eximg".$just])) { $allowedExts = array("gif", "jpeg", "jpg", "png"); $tmp = explode(".", $_FILES["eximg".$just]["name"]); $extension = end($tmp); if ((($_FILES["eximg".$just]["type"] == "image/gif") || ($_FILES["eximg".$just]["type"] == "image/jpeg") || ($_FILES["eximg".$just]["type"] == "image/jpg") || ($_FILES["eximg".$just]["type"] == "image/png")) && ($_FILES["eximg".$just]["size"] < 10485760)&& in_array($extension, $allowedExts)) { //DO $file = $_FILES['eximg'.$just]; $name = $file['name']; $tname = uniqid().$name; $path = "../tiendas/imagenes/" . basename($tname); if (move_uploaded_file($file['tmp_name'], $path)) { // Move succeed. } else { // Move failed. Possible duplicate? } //$sql = mysql_query("INSERT INTO `imagenes` (`url`,`prod_id` ) VALUES ('".$path."','".$idtienda."')"); $querry = 'UPDATE imagenes SET url="'.$path.'" WHERE id='.$_POST['eximg'.$just.''].''; $sql = mysql_query($querry) or trigger_error('Query failed: ' . mysql_error(), E_USER_ERROR); ; //display the success message echo "<center>Cambiaste la imagen satisfactoriamente!</center>"; // ... } else { $path = "../tiendas/imagenes/default.png"; $sql = mysql_query("INSERT INTO `imagenes` (`url`) VALUES ('".$path.")"); } } //termina img 1 } while ($just++ < 9); } }
Output for 5.3.0 - 5.4.20
Parse error: syntax error, unexpected '}' in /in/iga4v on line 63
Process exited with code 255.