mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
I added the function/method name to some compile-time deprecation messages which are related to parameters/return values. Consistently with the other similar error messages, I included the function/method name at the start of the message.
26 lines
739 B
PHP
26 lines
739 B
PHP
--TEST--
|
|
Bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong result)
|
|
--FILE--
|
|
<?php
|
|
|
|
function test(?PDO $a = null, $b = 0, array $c) {}
|
|
$r = new ReflectionFunction('test');
|
|
|
|
foreach ($r->getParameters() as $p) {
|
|
var_dump($p->isDefaultValueAvailable());
|
|
}
|
|
|
|
foreach ($r->getParameters() as $p) {
|
|
if ($p->isDefaultValueAvailable()) {
|
|
var_dump($p->getDefaultValue());
|
|
}
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: test(): Optional parameter $a declared before required parameter $c is implicitly treated as a required parameter in %s on line %d
|
|
|
|
Deprecated: test(): Optional parameter $b declared before required parameter $c is implicitly treated as a required parameter in %s on line %d
|
|
bool(false)
|
|
bool(false)
|
|
bool(false)
|