3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = ['test' => 'foo', 'bar' => ['bat' => ['baz']]]; $b = (object)$a; $c = (array)$b; var_dump($a); var_dump($b); var_dump($c);
Output for git.master, git.master_jit, rfc.property-hooks
array(2) { ["test"]=> string(3) "foo" ["bar"]=> array(1) { ["bat"]=> array(1) { [0]=> string(3) "baz" } } } object(stdClass)#1 (2) { ["test"]=> string(3) "foo" ["bar"]=> array(1) { ["bat"]=> array(1) { [0]=> string(3) "baz" } } } array(2) { ["test"]=> string(3) "foo" ["bar"]=> array(1) { ["bat"]=> array(1) { [0]=> string(3) "baz" } } }

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