3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getComments(){ $comments = [ "id" => 1, "comment" => "this is test comment", "favorite_users" => [10, 15, 2, 5], ]; return $comments + ['favorite_users_count' => count($comments['favorite_users'])]; } var_dump(getComments());
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { ["id"]=> int(1) ["comment"]=> string(20) "this is test comment" ["favorite_users"]=> array(4) { [0]=> int(10) [1]=> int(15) [2]=> int(2) [3]=> int(5) } ["favorite_users_count"]=> int(4) }

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:
131.33 ms | 406 KiB | 5 Q