3v4l.org

run code in 300+ PHP versions simultaneously
<?php $keys = ['1', '6', 4, '8', 'f', 200, '-1']; $one = []; foreach ($keys as $k) { $one[$k] = 'set'; } $two = []; foreach ($keys as $k) { $two[(int)$k] = 'set'; } var_dump($one, $two);
Output for git.master, git.master_jit, rfc.property-hooks
array(7) { [1]=> string(3) "set" [6]=> string(3) "set" [4]=> string(3) "set" [8]=> string(3) "set" ["f"]=> string(3) "set" [200]=> string(3) "set" [-1]=> string(3) "set" } array(7) { [1]=> string(3) "set" [6]=> string(3) "set" [4]=> string(3) "set" [8]=> string(3) "set" [0]=> string(3) "set" [200]=> string(3) "set" [-1]=> string(3) "set" }

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