xref: /PHP-8.0/Zend/tests/bug71930.phpt (revision f8d79582)
1--TEST--
2Bug #71930 (_zval_dtor_func: Assertion `(arr)->gc.refcount <= 1' failed)
3--SKIPIF--
4<?php
5if (!extension_loaded("curl")) {
6  die("skip Require a resource which is able to hold a callback");
7}
8?>
9--FILE--
10<?php
11
12class A {
13    public static function dummy() {
14    }
15}
16
17$a = array();
18$a[] = "A";
19$a[] = "dummy";
20
21$ch1 = curl_init();
22curl_setopt($ch1, CURLOPT_HEADERFUNCTION, $a);
23
24set_error_handler($a);
25set_error_handler(function()use($ch1){});
26set_error_handler(function(){});
27?>
28okey
29--EXPECT--
30okey
31