[php-src] Issue #20936: undefined behavior in zend_API.c

[email protected] (chongwick)
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/20936
Author: chongwick

### Description

The following code:

```php
<?php
$v_973 = '2022-07-16 12:00:00';
$v_974 = 'UTC';
$v_975 = new DateTimeZone($v_974,);
$v_976 = new DateTime($v_973,$v_975,);
$v_978 = null;
$v_980 = 'P2D';
$v_981 = new DateInterval($v_980,);
$v_983 = 2;
$v_985 = False;
$v_987 = True;
$v_966 = array('start' => $v_988,'end' => $v_976,'current' => $v_978,'interval' => $v_981,'recurrences' => $v_983,'include_start_date' => $v_985,'include_end_date' => $v_987,);
$v_988 = DatePeriod::__set_state($v_966,);
$v_989 = var_dump($v_988,);
```

Resulted in this output:
```
/home/w023dtc/nightly_php/php-src/Zend/zend_API.c:1794:6: runtime error: member access within null pointer of type 'zend_class_entry' (aka 'struct _zend_class_entry')
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/w023dtc/nightly_php/php-src/Zend/zend_API.c:1794
```



### PHP Version

```plain
nightly
```

### Operating System

ubuntu 22.04
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.