3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "Lorem Ipsum is simply one dummy text of the printing and two typesetting industry. Lorem Ipsum has been the industry's one standard dummy text ever since the three 1500s."; $keys = ['one', 'two', 'three']; $escaped = implode('|', array_map('preg_quote', $keys)); preg_match_all('#\b(' . $escaped . ')\b\s*\K.*?(?=\s*(?:$|\b(?:' . $escaped . ')\b))#', $text, $m, PREG_SET_ORDER); var_export(array_column($m, 0, 1));
Output for git.master, git.master_jit, rfc.property-hooks
array ( 'one' => 'standard dummy text ever since the', 'two' => 'typesetting industry. Lorem Ipsum has been the industry\'s', 'three' => '1500s.', )

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