3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array_caselle = Array ( 'cap' => 3, 'shirt' => 2, 'tatuaggio' => 1, 'badge' => 2 ); $finalArray = []; foreach ($array_caselle as $k => $v) { $finalArray[]= array_fill(0,$v,$k); } $finalArray = call_user_func_array('array_merge', $finalArray); print_r($finalArray);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => cap [1] => cap [2] => cap [3] => shirt [4] => shirt [5] => tatuaggio [6] => badge [7] => badge )

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