3v4l.org

run code in 300+ PHP versions simultaneously
<?php $postal_code_to_check = substr('m3a3b3', 0, 3); $patterns = array( '[A]{1}[0]{1}[P-Z]{1}', '[A]{1}[2]{1}[V]{1}', '[G]{1}[0]{1}[G]{1}', '[G]{1}[4]{1}[T]{1}', '[R]{1}[0]{1}[B]{1}', ); $regex = "/^(" . implode('|', $patterns) . ")$/i"; if (preg_match($regex, $postal_code_to_check)) { print_f('Matched!'); }
Output for git.master, git.master_jit, rfc.property-hooks

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