Skip to content

parse_url() regression in php 8.2, no longer recognizes 'scheme:#fragement` #9545

Closed
@Berdir

Description

@Berdir

Description

The following code:

<?php
var_dump(parse_url('internal:#feeding'));

Resulted in this output:

array(2) {
  ["path"]=>
  string(9) "internal:"
  ["fragment"]=>
  string(7) "feeding"
}

But I expected this output instead:

array(2) {
  ["scheme"]=>
  string(8) "internal"
  ["fragment"]=>
  string(7) "feeding"
}

See https://3v4l.org/nFqLN

This appears to a be a regression of #7844

PHP Version

PHP 8.2rc1

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