PHP 8.5.0 Beta 1 available for testing

Voting

: one minus zero?
(Example: nine)

The Note You're Voting On

adam dot schubert at sg1-game dot net
9 years ago
If you want to get only filename and dont want to use weird:

<?php
pathinfo
($file->getBasename(), PATHINFO_FILENAME);
?>

You can use (also weird but ~better looking):

<?php
$file
->getBasename('.'.$file->getExtension());
?>

PS: Why there is getFilename ? when it returns ~same stuff as getBasename ? I have to do this ugly stuff^ instead of simple getFilename...

<< Back to user notes page

To Top