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]+'; 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] => - [key] => [2] => [value] => exclude [3] => exclude ) [1] => Array ( [0] => -"exclude phrase" [flag] => - [1] => - [key] => [2] => [value] => "exclude phrase" [3] => "exclude phrase" ) [2] => Array ( [0] => "phrase 1" [flag] => [1] => [key] => [2] => [value] => "phrase 1" [3] => "phrase 1" ) [3] => Array ( [0] => keyword [flag] => [1] => [key] => [2] => [value] => keyword [3] => keyword ) [4] => Array ( [0] => +k:v [flag] => + [1] => + [key] => k: [2] => k: [value] => v [3] => v ) [5] => Array ( [0] => -k2:v2 [flag] => - [1] => - [key] => k2: [2] => k2: [value] => v2 [3] => v2 ) [6] => Array ( [0] => +"q kw":2 [flag] => + [1] => + [key] => "q kw" [2] => "q kw" [value] => :2 [3] => :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:
43.14 ms | 404 KiB | 8 Q