3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filename = "../test.a.b./../aaa.c"; var_dump(pathinfo($filename));
based on DvPej
Output for 5.2.0 - 7.1.0
array(4) { ["dirname"]=> string(15) "../test.a.b./.." ["basename"]=> string(5) "aaa.c" ["extension"]=> string(1) "c" ["filename"]=> string(3) "aaa" }
Output for 4.3.0 - 5.1.6
array(3) { ["dirname"]=> string(15) "../test.a.b./.." ["basename"]=> string(5) "aaa.c" ["extension"]=> string(1) "c" }