3v4l.org

run code in 300+ PHP versions simultaneously
<?php // MSSQL server side $data = [ 1 => 'hello', 2 => 'world', ]; // Imagine $data above is the array of rows returned by the db query header('Content-Type: application/json'); echo json_encode($data); exit; // IONOS Side $json = file_get_contents('http://your-database-server/some/url/or/other'); $data = json_decode(true); // Now do your updates // NB This is an INSECURE example, people who know the URL can see this data!

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
179.57 ms | 3328 KiB | 12 Q