3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ "ABwerty45^&*jk", "ABwerrtty", "LF%$^erftgt5234", "TABYR56H", "ab7877", "Abtyu7" ]; $arr = ['AB', 'DC', 'LF']; foreach ($strings as $string) { $match = in_array(substr($string, 0, 2), $arr); echo $match ? "Match: $string" . PHP_EOL : "No match: $string" . PHP_EOL; }
Output for git.master, git.master_jit, rfc.property-hooks
Match: ABwerty45^&*jk Match: ABwerrtty Match: LF%$^erftgt5234 No match: TABYR56H No match: ab7877 No match: Abtyu7

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:
17.83 ms | 401 KiB | 8 Q