### 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~~ would 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
Activity
cmb69 commentedon Jul 30, 2022
Closing in favor of #9196, which describes the root cause.
Work around dl(mysqli) issue with OPcache on AppVeyor
Work around dl(mysqli) issue with OPcache on AppVeyor
Avoid dl() in run-tests.php
Avoid dl() in run-tests.php (GH-16126)