mirror of
https://github.com/php/php-src.git
synced 2024-09-29 05:46:06 +00:00
21686f1b30
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.
14 lines
240 B
PHP
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"
|