3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [5,6,7]; $obj = (object)$arr; var_dump($obj); $obj->{'0'} = 'zzz'; var_dump($obj, $obj->{0}, $obj->{'0'}); $tmp = (array)$obj; var_dump($tmp, $tmp[0], $tmp['0']);
Output for git.master, git.master_jit, rfc.property-hooks
object(stdClass)#1 (3) { ["0"]=> int(5) ["1"]=> int(6) ["2"]=> int(7) } object(stdClass)#1 (3) { ["0"]=> string(3) "zzz" ["1"]=> int(6) ["2"]=> int(7) } string(3) "zzz" string(3) "zzz" array(3) { [0]=> string(3) "zzz" [1]=> int(6) [2]=> int(7) } string(3) "zzz" string(3) "zzz"

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:
132.49 ms | 406 KiB | 5 Q