3v4l.org

run code in 300+ PHP versions simultaneously
<?php if($stmt=$connection->prepare('SELECT user_ID FROM users WHERE email=(?)')) { $stmt->bind_param('s',$email); $stmt->execute(); $stmt->bind_result($user_ID); while ($stmt->fetch()) { $user=$user_ID; } if($stmt->errno!==0) { } $stmt->close(); } else { }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.16, 8.4.1 - 8.4.3
Warning: Undefined variable $connection in /in/gb4p9 on line 3 Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/gb4p9:3 Stack trace: #0 {main} thrown in /in/gb4p9 on line 3
Process exited with code 255.
Output for 7.1.0 - 7.1.25, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.33
Notice: Undefined variable: connection in /in/gb4p9 on line 3 Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/gb4p9:3 Stack trace: #0 {main} thrown in /in/gb4p9 on line 3
Process exited with code 255.
Output for 7.3.32 - 7.3.33
Fatal error: Uncaught Error: Call to a member function prepare() on null in /in/gb4p9:3 Stack trace: #0 {main} thrown in /in/gb4p9 on line 3
Process exited with code 255.

preferences:
195.36 ms | 409 KiB | 5 Q