3v4l.org

run code in 300+ PHP versions simultaneously
<?php // get host name from URL preg_match('@^(?:http://)?([^/]+)@i', "http://example.uk", $matches); $host = $matches[2]; // get last two segments of host name preg_match('/([^.]+)\.[^.]+$/', $host, $matches); echo "domain name is: {$matches[0]}\n";
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key 2 in /in/E03kA on line 6 Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /in/E03kA on line 9 Warning: Undefined array key 0 in /in/E03kA on line 10 domain name is:

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.71 ms | 402 KiB | 8 Q