Mecha CMS

Path::B()

Convert file path to its base name.

2.0.0 Static

Path::B(string $value, int $step = 1, string $join = DS);

Example:

$A = Path::B('foo\bar\baz.qux');
$B = Path::B('foo\bar\baz.qux', 2);
$C = Path::B('foo-bar-baz.qux', 1, '-');
$D = Path::B('foo.bar.baz.qux', 1, '.');

Result:

$A = 'baz.qux';
$B = 'bar\baz.qux';
$C = 'baz.qux';
$D = 'qux';