F::filename()
Extracts the filename from a file path
F::filename(string $name): string
Parameters
Name | Type | Default | Description |
---|---|---|---|
$namerequired | string |
no default value | The path |
Return type
string
Parent class
Examples
$filename = F::filename('/var/www/test.txt');
// filename is test.txt