3v4l.org

run code in 300+ PHP versions simultaneously
<?php $query = "-exclude -\"exclude phrase\" \"phrase 1\" keyword +k:v -k2:v2 +\"q kw\":2"; $ATOM_REGEX = '"[^"]+"|[^"\s]+'; "?> atomic group"; preg_match_all("/(?>(?P<flag>[-+])?((?P<key>$ATOM_REGEX):)?(?P<value>$ATOM_REGEX))/", $query, $match, PREG_SET_ORDER); print_r($match);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => -exclude [flag] => - [1] => - [2] => [key] => [3] => [value] => exclude [4] => exclude ) [1] => Array ( [0] => -"exclude phrase" [flag] => - [1] => - [2] => [key] => [3] => [value] => "exclude phrase" [4] => "exclude phrase" ) [2] => Array ( [0] => "phrase 1" [flag] => [1] => [2] => [key] => [3] => [value] => "phrase 1" [4] => "phrase 1" ) [3] => Array ( [0] => keyword [flag] => [1] => [2] => [key] => [3] => [value] => keyword [4] => keyword ) [4] => Array ( [0] => +k:v [flag] => + [1] => + [2] => k: [key] => k [3] => k [value] => v [4] => v ) [5] => Array ( [0] => -k2:v2 [flag] => - [1] => - [2] => k2: [key] => k2 [3] => k2 [value] => v2 [4] => v2 ) [6] => Array ( [0] => +"q kw":2 [flag] => + [1] => + [2] => "q kw": [key] => "q kw" [3] => "q kw" [value] => 2 [4] => 2 ) )

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:
42.69 ms | 405 KiB | 8 Q