3v4l.org

run code in 300+ PHP versions simultaneously
<?php $db = new PDO("mysql:host={$connect[0]}; dbname={$database}", $connect[1], $connect[2]); // Log each login attempt $ipAddress = $_SERVER['REMOTE_ADDR']; $logQuery = "INSERT INTO Logs.Logins (userName, ipAddress) VALUES (:userName,:ipAddress)"; $st = $db->prepare($logQuery); error here => $st->execute(['userName' =>$myName,'ipAddress'=>$ipAddress]); ?>
Output for 5.4.0 - 5.4.25
Parse error: syntax error, unexpected 'here' (T_STRING) in /in/MsvZs on line 7
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING in /in/MsvZs on line 7
Process exited with code 255.

preferences:
180.12 ms | 1395 KiB | 62 Q