xref: /PHP-7.1/ext/opcache/tests/bug76275.phpt (revision 279ba58e)
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--FILE--
8<?php
9
10if (PHP_VERSION_ID >= 70000) {
11    echo "Done";
12    return;
13}
14
15if (!is_callable('random_bytes')) {
16    try {
17    } catch (com_exception $e) {
18    }
19
20    function random_bytes($length)
21    {
22        throw new Exception(
23            'There is no suitable CSPRNG installed on your system'
24        );
25        return '';
26    }
27}
28--EXPECT--
29Done
30