3v4l.org

run code in 300+ PHP versions simultaneously
<?php $scandir = "home:///Pierpaolo/file.txt"; $scandir = preg_replace("/\/$/", "", $scandir); $scandir = preg_replace("/\/\.\.\/?/", "/", $scandir); $scandir = preg_replace("/\/$/", "", $scandir); echo $scandir; if ( (preg_match("/^([A-z0-9\-_]+)?\:\/\/?(.*)/", $scandir, $matches)) !== false ) { if ( sizeof($matches) === 3 ) { $protocol = "{$matches[1]}://"; $dirname = $matches[2]; } } echo $protocol." - ".$dirname ;
Output for git.master, git.master_jit, rfc.property-hooks
home:///Pierpaolo/file.txthome:// - /Pierpaolo/file.txt

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