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); print_r($match);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [0] => -exclude [1] => -"exclude phrase" [2] => "phrase 1" [3] => keyword [4] => +k:v [5] => -k2:v2 [6] => + [7] => q [8] => kw:2 ) [flag] => Array ( [0] => - [1] => - [2] => [3] => [4] => + [5] => - [6] => [7] => [8] => ) [1] => Array ( [0] => - [1] => - [2] => [3] => [4] => + [5] => - [6] => [7] => [8] => ) [key] => Array ( [0] => [1] => [2] => [3] => [4] => k: [5] => k2: [6] => [7] => [8] => kw: ) [2] => Array ( [0] => [1] => [2] => [3] => [4] => k: [5] => k2: [6] => [7] => [8] => kw: ) [value] => Array ( [0] => exclude [1] => "exclude phrase" [2] => "phrase 1" [3] => keyword [4] => v [5] => v2 [6] => + [7] => q [8] => 2 ) [3] => Array ( [0] => exclude [1] => "exclude phrase" [2] => "phrase 1" [3] => keyword [4] => v [5] => v2 [6] => + [7] => q [8] => 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:
44.05 ms | 405 KiB | 8 Q