3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = (array)json_decode('{"7":"value1","8":"value2","9":"value3","13":"value4"}'); $b = json_decode('{"7":"value1","8":"value2","9":"value3","13":"value4"}', true); $c = array('7' => 'value1', '8' => 'value2', '9' => 'value3','10' => 'value4'); var_dump($a, $b, $c); var_export($a); var_export($b); var_export($c); echo "\n"; var_dump(isset($a[7]), isset($a['7'])); var_dump(isset($b[7]), isset($b['7'])); var_dump(isset($c[7]), isset($c['7']));
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { [7]=> string(6) "value1" [8]=> string(6) "value2" [9]=> string(6) "value3" [13]=> string(6) "value4" } array(4) { [7]=> string(6) "value1" [8]=> string(6) "value2" [9]=> string(6) "value3" [13]=> string(6) "value4" } array(4) { [7]=> string(6) "value1" [8]=> string(6) "value2" [9]=> string(6) "value3" [10]=> string(6) "value4" } array ( 7 => 'value1', 8 => 'value2', 9 => 'value3', 13 => 'value4', )array ( 7 => 'value1', 8 => 'value2', 9 => 'value3', 13 => 'value4', )array ( 7 => 'value1', 8 => 'value2', 9 => 'value3', 10 => 'value4', ) bool(true) bool(true) bool(true) bool(true) bool(true) bool(true)

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:
33.05 ms | 407 KiB | 5 Q