1
0
mirror of https://github.com/php/php-src.git synced 2026-03-25 16:52:18 +01:00
Files
archived-php-src/ext/reflection/tests/default_value_leak.phpt
Nikita Popov c2b23d8cbe Fix leak in isDefaultValueAvailable()
Exposed in Symfony due to exit changes.
2020-06-30 11:16:56 +02:00

23 lines
384 B
PHP

--TEST--
Check that isDefaultValueConstant() does not leak
--FILE--
<?php
class Test {
public function method($param = [123]) {}
}
$rp = new ReflectionParameter(['Test', 'method'], 'param');
var_dump($rp->isDefaultValueAvailable());
var_dump($rp->isDefaultValueConstant());
var_dump($rp->getDefaultValue());
?>
--EXPECT--
bool(true)
bool(false)
array(1) {
[0]=>
int(123)
}