3v4l.org

run code in 300+ PHP versions simultaneously
<?php $PregArray = ['date:1111aaa', ':222aaa', '@odia tvled']; $array['attract (step-date:1111aaa)'] = 'OK'; $array['type (step-date:222aaa)'] = 'OK'; $array['@odia tvled'] = 'OK'; foreach ($PregArray as $key_1 => $val_1) { echo "\n--------------"; foreach ($array as $key_2 => $val_2) { if (preg_match('~' . preg_quote($val_1) . '~', $key_2)) { echo "\nOK => $val_1 - $key_2"; break; } else { echo "\nNOK !!! => $val_1 - $key_2"; } } }
Output for git.master, git.master_jit, rfc.property-hooks
-------------- OK => date:1111aaa - attract (step-date:1111aaa) -------------- NOK !!! => :222aaa - attract (step-date:1111aaa) OK => :222aaa - type (step-date:222aaa) -------------- NOK !!! => @odia tvled - attract (step-date:1111aaa) NOK !!! => @odia tvled - type (step-date:222aaa) OK => @odia tvled - @odia tvled

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:
119.51 ms | 406 KiB | 5 Q