3v4l.org

run code in 500+ PHP versions simultaneously
<?php $searchData = ['%browser%', '%os%', '%city%']; $replaceData = ['Chrome', 'Windows', 'Delhi']; $str = 'When i work in %city% i was given with a laptop with %os% installed and it came with %browser%. everyone used `same %browser%` in our office.'; $rep = array_combine($searchData, $replaceData); $pattern = '~`[^`]*`(*SKIP)(*F)|' . implode('|', $searchData) . '~'; $result = preg_replace_callback($pattern, fn($m) => $rep[$m[0]], $str); echo $result;
Output for git.master, git.master_jit, rfc.property-hooks
When i work in Delhi i was given with a laptop with Windows installed and it came with Chrome. everyone used `same %browser%` in our office.

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:
42.21 ms | 1436 KiB | 4 Q