3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * @link http://www.php.net/manual/en/splfileinfo.getfilename.php */ $info = new SplFileInfo('/path/to/'); var_dump($info->getFilename()); $info = new SplFileInfo('http://example.com/path/to/'); var_dump($info->getFilename()); $info = new SplFileInfo('http://example.com/path/'); var_dump($info->getFilename()); $info = new SplFileInfo('http://example.com/'); var_dump($info->getFilename()); $info = new SplFileInfo('http://'); var_dump($info->getFilename()); $info = new SplFileInfo('http:/'); var_dump($info->getFilename());
Output for git.master, git.master_jit
string(2) "to" string(2) "to" string(4) "path" string(11) "example.com" string(0) "" string(5) "http:"
Output for rfc.property-hooks
string(2) "to" string(2) "to" string(4) "path" string(11) "example.com" string(5) "http:" string(5) "http:"

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