3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $file = '/foo bar/baz blah.zip'; var_dump(pathinfo($file));
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(4) { ["dirname"]=> string(8) "/foo bar" ["basename"]=> string(12) "baz blah.zip" ["extension"]=> string(3) "zip" ["filename"]=> string(8) "baz blah" }
Output for 4.3.0 - 5.1.6
array(3) { ["dirname"]=> string(8) "/foo bar" ["basename"]=> string(12) "baz blah.zip" ["extension"]=> string(3) "zip" }