3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'item1' => 'red', 'item2' => 'blue#foo#', 'item3' => 'green', 'item4' => 'white#foo2#', 'item5' => 'bla#foo3#ck', 'item6' => 'yellow#foo#', ]; $translations = [ '~#foo#~' => 'John', '~#foo2#~' => 'California', '~#foo3#~' => 'Cola', ]; var_export(preg_replace(array_keys($translations), $translations, $array));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'item1' => 'red', 'item2' => 'blueJohn', 'item3' => 'green', 'item4' => 'whiteCalifornia', 'item5' => 'blaColack', 'item6' => 'yellowJohn', )

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:
176.65 ms | 405 KiB | 5 Q