xref: /PHP-7.4/ext/reflection/tests/bug46205.phpt (revision 3121b717)
1--TEST--
2Bug #46205 (Closure - Memory leaks when ReflectionException is thrown)
3--FILE--
4<?php
5$x = new reflectionmethod('reflectionparameter', 'export');
6$y = function() { };
7
8try {
9	$x->invokeArgs(new reflectionparameter('trim', 'str'), array($y, 1));
10} catch (Exception $e) { }
11?>
12ok
13--EXPECTF--
14Deprecated: Function ReflectionParameter::export() is deprecated in %s on line %d
15ok
16