php-8.0.30-src/ext/reflection/tests/bug70674.phpt

9 lines
208 B
PHP

--TEST--
Bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
--FILE--
<?php
var_dump(((new ReflectionFunction("strlen"))->getClosure())("hello"));
?>
--EXPECT--
int(5)