php-src/ext/spl/tests/spl_fileinfo_getextension_leadingdot.phpt
Anthony Ferrara 21686f1b30 Revert SplFileInfo BC break while keeping fix for assertion removal
This reverts the minor bc-break where .test would return an empty extension. This is different from 5.x's behavior.

In 7, it would result in an assertion failure crash. The fix for the removal of this assertion is kept, keeping BC with 5.x.
2015-07-13 13:27:06 -04:00

14 lines
240 B
PHP

--TEST--
SPL: Spl File Info test getExtension with leading dot
--FILE--
<?php
$file = __DIR__ . '/.test';
touch($file);
$fileInfo = new SplFileInfo($file);
var_dump($fileInfo->getExtension());
unlink($file);
?>
--EXPECT--
string(4) "test"