3v4l.org

run code in 300+ PHP versions simultaneously
<?php $db_string = "{\"flugel en relinde\":\"1\",\"Bottom level 1\":\"4\",\"Underground level 2\":\"8\",\"Middle level 2\":\"6\"}"; function test(array $data = array()) { print_r($data); print_r(json_decode($data, true)); } test(json_decode($db_string, true));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [flugel en relinde] => 1 [Bottom level 1] => 4 [Underground level 2] => 8 [Middle level 2] => 6 ) Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /in/aoaou:7 Stack trace: #0 /in/aoaou(7): json_decode(Array, true) #1 /in/aoaou(10): test(Array) #2 {main} thrown in /in/aoaou on line 7
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
37.22 ms | 401 KiB | 8 Q