3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
Warning: 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 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.31, 7.4.0 - 7.4.33
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 7.3.32 - 7.3.33
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.

preferences:
43.27 ms | 408 KiB | 5 Q