3v4l.org

run code in 300+ PHP versions simultaneously
<?php if(!isset($_POST['fb_member_id']) || !isset($_POST['fullname']) || !isset($_POST['mail') || !isset($_POST['gender']) || !isset($_POST['timezone']) || !isset($_POST['date_rec']) || !isset($_POST['app_name'])){ echo json_encode("no token"); return; } $dbhost = "localhost"; $dbname = "thxxxxxxxers_fb_members"; $dbuser = "txp"; $dbpass = "x"; try { $dbh = new PDO('mysql:host=' .$dbhost . ';dbname='.$dbname, $dbuser, $dbpass); $sql = "insert into votes (fb_member_id, fullname, mail, gender, timezone, date_rec, app_name) VALUES (:fb_member_id, :fullname, :mail, :gender, :timezone, :date_rec, :app_name)"; $stmt = $conn->prepare($sql); $stmt->bindValue(':fb_member_id', $_POST['fb_member_id']); $stmt->bindValue(':fullname', $_POST['fullname']); $stmt->bindValue(':mail', $_POST['mail']); $stmt->bindValue(':gender', $_POST['gender']); $stmt->bindValue(':timezone', $_POST['timezone']); $stmt->bindValue(':date_rec', $_POST['date_rec']); $stmt->bindValue(':app_name', $_POST['app_name']); $stmt->execute(); // $q->execute(array($title)); } catch (PDOException $e) { echo json_encode($e); die(); } ?>
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.32
Parse error: syntax error, unexpected ')', expecting ']' in /in/Cgu7l on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.3.11, 4.4.0 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected ')', expecting ']' in /in/Cgu7l on line 5
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `']'' in /in/Cgu7l on line 5
Process exited with code 255.

preferences:
204.77 ms | 1395 KiB | 123 Q