3v4l.org

run code in 300+ PHP versions simultaneously
<?php $one_array_key = ['A', 'A', 'A', 'B', 'B', 'B']; $second_array_values = ['arn1', 'arn2', 'arn3', 'arn4', 'arn5', 'arn6']; foreach ($one_array_key as $index => $value) { $$value[] = $second_array_values[$index]; } var_export($A); echo "\n---\n"; var_export($B);
Output for git.master, git.master_jit, rfc.property-hooks
array ( 0 => 'arn1', 1 => 'arn2', 2 => 'arn3', ) --- array ( 0 => 'arn4', 1 => 'arn5', 2 => 'arn6', )

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:
43.37 ms | 1396 KiB | 5 Q