[php-src] Issue #8508: dl("mysqli") fails when OPcache is enabled
| From: | cmb69 | Date: | Fri, 06 May 2022 17:29:00 +0000 |
| Subject: | [php-src] Issue #8508: dl("mysqli") fails when OPcache is enabled | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-241428@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/8508
Author: cmb69
### Description
The following code:
```php
<?php
dl("mysqli");
```
Resulted in this output:
```
Fatal error: Internal zvals cannot be refcounted in Unknown on line 0
```
But I expected this output instead:
```
```
The problem is
mysqli_exception::$sqlstate; its value "00000" won't be
interned, and so the respective check
https://github.com/php/php-src/blob/95f5f9d21d90d11e00c88af1d368326681ee606d/Zend/zend_API.c#L3814-L3816
fails, causing PHP to bail out.
This is particularly an issue regarding the tests, because as of PHP 8.1.0, [run-tests.php tries to
figure out which dynamic extension can be loaded to gather the
$exts_to_tests](https://github.com/php/php-src/blob/a82ee8e38bbbf9c780a6fe5041252dd32cd2a0ad/run-tests.php#L882-L897);
however, due to this issue the list is not complete, so when OPcache is enabled, about 2.000 tests
are not executed on AppVeyor CI.
### PHP Version
PHP-8.0
### Operating System
Windows