3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Name=John AND State=OR OR State=CA"; if (preg_match_all( '~([a-zA-Z]+=\S+)(?: ([A-Z]{2,3}))?~', $string, $out, PREG_SET_ORDER ) ) { echo "data = "; var_export(array_column($out, 1)); echo "\nconjunctions = "; var_export(array_column($out, 2)); }
Output for git.master, git.master_jit, rfc.property-hooks
data = array ( 0 => 'Name=John', 1 => 'State=OR', 2 => 'State=CA', ) conjunctions = array ( 0 => 'AND', 1 => 'OR', )

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