3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $filename ="aaa\n.x\ny"; var_dump(basename($filename)); echo 7; preg_match('#\.(.+)$#', $filename, $matches); var_dump($matches);
based on I6BPK
Output for 5.3.21 - 7.2.0
string(8) "aaa .x y" 7array(0) { }