3v4l.org

run code in 300+ PHP versions simultaneously
<?php $object = array( 'key' => 'value', 1 => 'value', '11' => 'value', '22' => 'value' ); $object = (object) $object; var_dump($object); print_r($object); $object->key = 'changed value'; $object->{1} = 'changed value'; $object->{'11'} = 'changed value'; $object->{'22'} = 'changed value'; $object = (array) $object; var_dump($object); print_r($object);
Output for git.master, git.master_jit, rfc.property-hooks
object(stdClass)#1 (4) { ["key"]=> string(5) "value" ["1"]=> string(5) "value" ["11"]=> string(5) "value" ["22"]=> string(5) "value" } stdClass Object ( [key] => value [1] => value [11] => value [22] => value ) array(4) { ["key"]=> string(13) "changed value" [1]=> string(13) "changed value" [11]=> string(13) "changed value" [22]=> string(13) "changed value" } Array ( [key] => changed value [1] => changed value [11] => changed value [22] => changed value )

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