3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(pathinfo('hello')); var_dump(pathinfo('hello.lol.jpg')); var_dump(pathinfo('hello', PATHINFO_EXTENSION));
based on iDMC3
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(3) { ["dirname"]=> string(1) "." ["basename"]=> string(5) "hello" ["filename"]=> string(5) "hello" } array(4) { ["dirname"]=> string(1) "." ["basename"]=> string(13) "hello.lol.jpg" ["extension"]=> string(3) "jpg" ["filename"]=> string(9) "hello.lol" } string(0) ""
Output for 4.3.2 - 5.1.6
array(2) { ["dirname"]=> string(1) "." ["basename"]=> string(5) "hello" } array(3) { ["dirname"]=> string(1) "." ["basename"]=> string(13) "hello.lol.jpg" ["extension"]=> string(3) "jpg" } string(0) ""
Output for 4.3.0 - 4.3.1
array(2) { ["dirname"]=> string(1) "." ["basename"]=> string(5) "hello" } array(3) { ["dirname"]=> string(1) "." ["basename"]=> string(13) "hello.lol.jpg" ["extension"]=> string(3) "jpg" }
Process exited with code 139.