3v4l.org

run code in 300+ PHP versions simultaneously
<?php $cusID = 408; $curTimeStamp = time(); $query = "INSERT INTO `Account_Lock_Logs` VALUES(:customer_ID , :date) ON DUPLICATE KEY UPDATE `change_date` = :date2"; //die(var_dump($stmt = $pdo->prepare($query))); $params = array(':customer_ID' => $cusID, ':date' => $curTimeStamp, ':date2' => $curTimeStamp); //die(var_dump($params)); die(var_dump($stmt->execute($params)));
Output for 7.0.5 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
Notice: Undefined variable: stmt in /in/YY7PR on line 8 Fatal error: Uncaught Error: Call to a member function execute() on null in /in/YY7PR:8 Stack trace: #0 {main} thrown in /in/YY7PR on line 8
Process exited with code 255.
Output for 7.0.0 - 7.0.4
Notice: Undefined variable: stmt in /in/YY7PR on line 8 Fatal error: Uncaught Error: Call to a member function execute() on unknown in /in/YY7PR:8 Stack trace: #0 {main} thrown in /in/YY7PR on line 8
Process exited with code 255.
Output for 5.6.0 - 5.6.38
Notice: Undefined variable: stmt in /in/YY7PR on line 8 Fatal error: Call to a member function execute() on null in /in/YY7PR on line 8
Process exited with code 255.
Output for 5.4.0 - 5.4.45, 5.5.0 - 5.5.38
Notice: Undefined variable: stmt in /in/YY7PR on line 8 Fatal error: Call to a member function execute() on a non-object in /in/YY7PR on line 8
Process exited with code 255.

preferences:
165.92 ms | 401 KiB | 237 Q