Skip to content

SplFileInfo#getBasename() truncates first character #8861

Closed
@m-vo

Description

@m-vo

Description

The following code:

<?php
$file = new \SplFileInfo('foo');
var_dump($file->getBasename());

Resulted in this output:

string(2) "oo"

But I expected this output instead:

string(3) "foo"

See https://3v4l.org/VmBqd/rfc#vgit.master.

PHP Version

current master

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions