3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $updates = [ "service" => "k", "price" => "85.0", "id" => "442" ]; //take the keys above and turn them into variables like the ones shown below $stmt->bind_param(str_repeat("s", count(updates)),$service,$price,$id);
Output for 7.1.0 - 7.3.0rc3
Notice: Undefined variable: stmt in /in/9c15a on line 10 Fatal error: Uncaught Error: Call to a member function bind_param() on null in /in/9c15a:10 Stack trace: #0 {main} thrown in /in/9c15a on line 10
Process exited with code 255.
Output for hhvm-3.22.0
Notice: Undefined variable: stmt in /in/9c15a on line -1 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function bind_param() on a non-object (null)' in /in/9c15a:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.18.5 - 3.21.3
Notice: Undefined variable: stmt in /in/9c15a on line 10 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function bind_param() on a non-object (null)' in /in/9c15a:10 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.0 - 5.6.30
Notice: Undefined variable: stmt in /in/9c15a on line 10 Fatal error: Call to a member function bind_param() on null in /in/9c15a on line 10
Process exited with code 255.