Mecha CMS

Path::X()

Get file extension from a file path.

2.0.0 Static

Path::X(string $value, $x = false);

Example:

$A = Path::X('foo\bar\baz.qux');
$B = Path::X('foo\bar\baz.QUX');
$C = Path::X('foo\bar\baz');

Result:

$A = 'qux';
$B = 'qux';
$C = null;