3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mb_pathinfo($filepath) { preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$%im',$filepath,$m); if($m[1]) $ret['dirname']=$m[1]; if($m[2]) $ret['basename']=$m[2]; if($m[5]) $ret['extension']=$m[5]; if($m[3]) $ret['filename']=$m[3]; return $ret; } print_r(mb_pathinfo("/mnt/files/飛兒樂團光茫.mp3"));
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [dirname] => /mnt/files [basename] => 飛兒樂團光茫.mp3 [extension] => mp3 [filename] => 飛兒樂團光茫 )

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