If you're looking to extract only the "ex.php" part of the full "/home/bjori/tmp/ex.php", then use:
<?php
echo basename($e->getFile())
?>
or better yet, esp. if your paths possibly contain non-ASCII characters:
<?php
echo pathinfo($e->getFile())['basename']
?>