[php-src] Issue #11338: SplFileInfo empty getBasename with more than on slash after PHP 8.1.1

From: Date: Mon, 29 May 2023 12:22:40 +0000
Subject: [php-src] Issue #11338: SplFileInfo empty getBasename with more than on slash after PHP 8.1.1
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244564@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/11338 Author: deniskulygin ### Description The following code: ```php <?php $file = new \SplFileInfo('/dir/anotherdir/basedir//'); var_dump($file->getBasename()); ``` https://3v4l.org/vAh4f#v8.1.0 Resulted in this output: ``` string(0) "" ``` But I expected this output instead: ``` string(7) "basedir" ``` Before PHP 8.1.1 you got basename even with 2 slashes. ### PHP Version 8.1.1 ### Operating System _No response_

« previous php.bugs (#244564) next »