3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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.2.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.28
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.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.