3v4l.org

run code in 300+ PHP versions simultaneously
<?php $needle = ':Name'; $str = ":Name :Name_en"; echo "Leading word boundary\t\t" . preg_replace("#\b$needle\b#", '"Test"', $str); echo "\n---\n"; echo "No leading word boundary\t" . preg_replace("#$needle\b#", '"Test"', $str); echo "\n---\n"; echo "Leading non-word boundary\t" . preg_replace("#\B$needle\b#", '"Test"', $str);
Output for git.master, git.master_jit, rfc.property-hooks
Leading word boundary :Name :Name_en --- No leading word boundary "Test" :Name_en --- Leading non-word boundary "Test" :Name_en

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:
262.42 ms | 995 KiB | 4 Q