3v4l.org

run code in 300+ PHP versions simultaneously
<?php $sample = <<<'EOT' { "movie": { "genre": [ { "code": 13025, "$": "Action" }, { "code": 13012, "$": "Fantastique" } ] } } EOT; $var = json_decode($sample, true); var_dump($var, $var['movie']['genre'][1]['$']);
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { ["movie"]=> array(1) { ["genre"]=> array(2) { [0]=> array(2) { ["code"]=> int(13025) ["$"]=> string(6) "Action" } [1]=> array(2) { ["code"]=> int(13012) ["$"]=> string(11) "Fantastique" } } } } string(11) "Fantastique"

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:
53.67 ms | 402 KiB | 8 Q