3v4l.org

run code in 500+ PHP versions simultaneously
<?php $usr = (object)[ 'interests' => 'Cats,Dogs,Monkeys,Praying Mantises,Octopuses,Arowanas,Sloths,Tasmanian Tigers' ]; $showMax = 3; printf( 'Interested in: %s', preg_replace_callback_array( [ '/([^,]+)(,)?/' => fn($m) => '<span>' . $m[1] . '</span>' . (isset($m[2]) ? ', ' : ''), '/, [^<].*/' => fn($m) => ' (+' . substr_count($m[0], ',') . ')' ], $usr->interests, $showMax ) );
Output for git.master_jit, git.master
Interested in: <span>Cats</span>, <span>Dogs</span>, <span>Monkeys</span> (+5)

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:
54.26 ms | 844 KiB | 4 Q