3v4l.org

run code in 300+ PHP versions simultaneously
<?php function traverse($arr){ $result_2 = []; while (key($arr)) { $result_2[key($arr)] = current($arr); next($arr); } print_r($result_2); } $data = [ "k0"=>"v0", "k1"=>"v1", "k2"=>"v2", "k3"=>"v3", "k4"=>"v4", ]; traverse($data); $result_1 = []; while (key($data)) { $result_1[key($data)] = current($data); next($data); } print_r($result_1);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [k0] => v0 [k1] => v1 [k2] => v2 [k3] => v3 [k4] => v4 ) Array ( [k0] => v0 [k1] => v1 [k2] => v2 [k3] => v3 [k4] => v4 )

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