<?php $path = '/home/fapchat/Документы';echo basename($path), PHP_EOL;print_r(pathinfo($path));
Standard input is empty
Документы Array ( [dirname] => /home/fapchat [basename] => Документы [filename] => Документы )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!