Viewing File: /opt/alt/tests/alt-php82-pecl-psr_1.2.0-1.el8/tests/gh78_php7.phpt
--TEST--
Psr\Log\LoggerInterface - Invalid context default value (PHP 7)
--SKIPIF--
<?php
include 'skip.inc';
if (PHP_VERSION_ID >= 80000) {
print "skip Due to version incompatibility";
}
?>
--FILE--
<?php
$reflectionMethod = new \ReflectionMethod(\Psr\Log\LoggerInterface::class, "emergency");
$reflectionParameter = $reflectionMethod->getParameters()[1];
var_dump($reflectionParameter->isOptional());
var_dump($reflectionParameter->isDefaultValueAvailable());
var_dump($reflectionParameter->getDefaultValue());
--EXPECT--
bool(true)
bool(true)
array(0) {
}
--XFAIL--
PHP 7 internal functions cannot have default values reported via reflection
Back to Directory
File Manager
<