Skip to content

Segmentation fault with PHP 8.3.20 #18339

Closed as duplicate
Closed as duplicate

Description

@kylekatarnls

Description

The following code:

<?php

$interval = new \DateInterval('PT0S');
$unit = 'h';
$interval->$unit += 0;
var_dump($interval->h);

https://3v4l.org/XP384#v8.3.20

Resulted in this output:

Segmentation fault

But I expected this output instead:

0

(Result we get from PHP 8.3.19 and 8.4.6)

It's possibly the root cause of #18337

PHP Version

8.3.20

Operating System

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions