3v4l.org

run code in 300+ PHP versions simultaneously
<?php function d($v) { $r = json_decode($v); var_dump($r); } d('{ "items": [ { "title": "Foo Bar" }, { "title": "Bar Foo" } ], "content": { "title": "Super duper title", "_empty": false } }');
Output for 8.0.1 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
object(stdClass)#3 (2) { ["items"]=> array(2) { [0]=> object(stdClass)#1 (1) { ["title"]=> string(7) "Foo Bar" } [1]=> object(stdClass)#2 (1) { ["title"]=> string(7) "Bar Foo" } } ["content"]=> object(stdClass)#4 (2) { ["title"]=> string(17) "Super duper title" ["_empty"]=> bool(false) } }

preferences:
62.25 ms | 407 KiB | 5 Q