3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array_fill_keys([1.5], 'hello'); $b = [1.5 => 'hello']; var_dump([$a, $b]); var_dump([$a[1.5], $b[1.5]]);
Output for git.master, git.master_jit, rfc.property-hooks
Deprecated: Implicit conversion from float 1.5 to int loses precision in /in/gvfc9 on line 4 array(2) { [0]=> array(1) { ["1.5"]=> string(5) "hello" } [1]=> array(1) { [1]=> string(5) "hello" } } Deprecated: Implicit conversion from float 1.5 to int loses precision in /in/gvfc9 on line 7 Warning: Undefined array key 1 in /in/gvfc9 on line 7 Deprecated: Implicit conversion from float 1.5 to int loses precision in /in/gvfc9 on line 7 array(2) { [0]=> NULL [1]=> string(5) "hello" }

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