3v4l.org

run code in 300+ PHP versions simultaneously
<?php $path = null; $list = array('k1' => 'f1.txt', 'k2' => 'f2.txt', 'k3' => 'f3.txt', 'k4' => 'f4.txt'); //$mapping = array_map(function($item) use ($path) { return $path ? $path . $item : $item; }, $list); $pfxFilePath = 'pfxFilePath'; $passFilePath = 'passFilePath'; array_walk($list, function(&$item, $i) use ($pfxFilePath, $passFilePath) { $item.= $pfxFilePath . $passFilePath; }); var_dump($list);
Output for git.master, git.master_jit, rfc.property-hooks
array(4) { ["k1"]=> string(29) "f1.txtpfxFilePathpassFilePath" ["k2"]=> string(29) "f2.txtpfxFilePathpassFilePath" ["k3"]=> string(29) "f3.txtpfxFilePathpassFilePath" ["k4"]=> string(29) "f4.txtpfxFilePathpassFilePath" }

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