xref: /PHP-8.1/ext/opcache/tests/bug76275.phpt (revision e9f783fc)
1--TEST--
2Bug #76275: Assertion failure in file cache when unserializing empty try_catch_array
3--INI--
4opcache.enabled=1
5opcache.enable_cli=1
6opcache.file_cache="{TMP}"
7--EXTENSIONS--
8opcache
9--FILE--
10<?php
11if (PHP_VERSION_ID >= 70000) {
12    echo "Done";
13    return;
14}
15if (!is_callable('random_bytes')) {
16    try {
17    } catch (com_exception $e) {
18    }
19    function random_bytes($length)
20    {
21        throw new Exception(
22            'There is no suitable CSPRNG installed on your system'
23        );
24        return '';
25    }
26}
27?>
28--EXPECT--
29Done
30