3v4l.org

run code in 300+ PHP versions simultaneously
<?php $model = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry`s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.'; $phrases= [ "printing and typesetting industry Lorem Ipsum" , "industry`s standard dummy text ever since the 1500s," ,"type specimen book, It has survived" ,"but also the leap into electronic typesetting, remaining essentially unchanged." ,"containing Lorem Ipsum passages and" ,"PageMaker including versions of Lorem Ipsum." ]; $phrases = array_map(function($phrase) { return preg_replace(array('/[.?!,:;\-{}\[\]()\'`"]/', '/\s+/'), array('([.?!,:;\\-{}\\[\\]()\'`"]|\s+)', '([.?!,:;\\-{}\\[\\]()\'`"]*\s+|\s+[.?!,:;\\-{}\\[\\]()\'`"]*)'), "@$phrase@iu"); }, array_reverse($phrases)); print_r($phrases); echo $model = preg_replace($phrases, '<span style="color:red">$0</span>', $model);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => @PageMaker([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)including([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)versions([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)of([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)Lorem([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)Ipsum([.?!,:;\-{}\[\]()'`"]|\s+)@iu [1] => @containing([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)Lorem([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)Ipsum([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)passages([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)and@iu [2] => @but([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)also([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)the([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)leap([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)into([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)electronic([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)typesetting([.?!,:;\-{}\[\]()'`"]|\s+)([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)remaining([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)essentially([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)unchanged([.?!,:;\-{}\[\]()'`"]|\s+)@iu [3] => @type([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)specimen([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)book([.?!,:;\-{}\[\]()'`"]|\s+)([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)It([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)has([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)survived@iu [4] => @industry([.?!,:;\-{}\[\]()'`"]|\s+)s([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)standard([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)dummy([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)text([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)ever([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)since([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)the([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)1500s([.?!,:;\-{}\[\]()'`"]|\s+)@iu [5] => @printing([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)and([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)typesetting([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)industry([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)Lorem([.?!,:;\-{}\[\]()'`"]*\s+|\s+[.?!,:;\-{}\[\]()'`"]*)Ipsum@iu ) Lorem Ipsum is simply dummy text of the <span style="color:red">printing and typesetting industry. Lorem Ipsum</span> has been the <span style="color:red">industry`s standard dummy text ever since the 1500s,</span> when an unknown printer took a galley of type and scrambled it to make a <span style="color:red">type specimen book. It has survived</span> not only five centuries, <span style="color:red">but also the leap into electronic typesetting, remaining essentially unchanged.</span> It was popularised in the 1960s with the release of Letraset sheets <span style="color:red">containing Lorem Ipsum passages, and</span> more recently with desktop publishing software like Aldus <span style="color:red">PageMaker including versions of Lorem Ipsum.</span>

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:
121.79 ms | 417 KiB | 5 Q