3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = (array) json_decode('{"a":"1","2":"1","3":"1","4":"1","12":"1"}'); #var_dump($array); #var_dump(array_key_exists('a', $array)); #var_dump(array_key_exists(12, $array)); #var_dump($array[12]); #var_dump($array['12']); #var_dump($array[12]); #$var = (array)json_decode('{"a":"1","2":"1","3":"1","4":"1","12":"1"}'); #var_dump($var['2']); #var_export($var); $var = array('a'=>1, '2'=>2); var_export($var); $var = (object) $var; var_export($var);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'a' => 1, 2 => 2, )(object) array( 'a' => 1, '2' => 2, )

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:
42.58 ms | 401 KiB | 8 Q