3v4l.org

run code in 300+ PHP versions simultaneously
<?php $txt = '<div id="5">'; preg_match('`\s+([\w-]+)="([^"]*)"`', $txt, $match); var_dump($match); preg_match('`\s+(?P<key>[\w-]+)="(?P<value>[^"]*)"`', $txt, $match); var_dump($match); preg_match('`\s+(?<key>[\w-]+)="(?<value>[^"]*)"`', $txt, $match); var_dump($match);
Output for git.master, git.master_jit, rfc.property-hooks
array(3) { [0]=> string(7) " id="5"" [1]=> string(2) "id" [2]=> string(1) "5" } array(5) { [0]=> string(7) " id="5"" ["key"]=> string(2) "id" [1]=> string(2) "id" ["value"]=> string(1) "5" [2]=> string(1) "5" } array(5) { [0]=> string(7) " id="5"" ["key"]=> string(2) "id" [1]=> string(2) "id" ["value"]=> string(1) "5" [2]=> string(1) "5" }

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:
64.69 ms | 402 KiB | 8 Q