3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'application/vnd.github.full+json'; function match($string) { $pattern = '#(?P<maintype>[a-z].*)/(?P<fullsubtype>(?P<subtype>[a-z0-9.-]*)([+](?P<submediatype>[a-z]*))?)#i'; preg_match($pattern, $string, $matches); return $matches; } var_dump(match('application/vnd.github.full+json')); var_dump(match('text/html'));
Output for git.master, git.master_jit, rfc.property-hooks
Parse error: syntax error, unexpected token "match", expecting "(" in /in/4V2Kr on line 4
Process exited with code 255.

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:
35.35 ms | 401 KiB | 8 Q