3v4l.org

run code in 300+ PHP versions simultaneously
<?php $staticArray = ['group_1', 'group_2']; foreach ($staticArray as $name){ $names[] = $name; } $staticArray2 = ['one', 'two']; $i = 0; foreach ($staticArray2 as $name){ $item['group']['name'] = $names[$i]; $item['group']['user_1'] = 'Peter'; $item['group']['user_2'] = 'Jack'; $groups[] = $item; $i++; } print_r($groups);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [group] => Array ( [name] => group_1 [user_1] => Peter [user_2] => Jack ) ) [1] => Array ( [group] => Array ( [name] => group_2 [user_1] => Peter [user_2] => Jack ) ) )

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