fork download
  1. <?php
  2.  
  3. $path = '/home/fapchat/Документы';
  4. echo basename($path), PHP_EOL;
  5. print_r(pathinfo($path));
Success #stdin #stdout 0.02s 24460KB
stdin
Standard input is empty
stdout
Документы
Array
(
    [dirname] => /home/fapchat
    [basename] => Документы
    [filename] => Документы
)