1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00
Commit Graph

4 Commits

Author SHA1 Message Date
Nikita Popov afc4d67c8b Consistently treat optional-before-required as required
There was a loophole here when it came to usage with named arguments,
which was not intended. Close the loophole thoroughly by actually
dropping the default value from the signature entirely. The default
is still used to make the type nullable, but not for anything else.
2021-05-18 12:40:58 +02:00
Nikita Popov 3b08f53c97 Deprecate required param after optional
As an exception, we allow "Type $foo = null" to occur before a
required parameter, because this pattern was used as a replacement
for nullable types in PHP versions older than 7.1.

Closes GH-5067.
2020-02-18 14:35:58 +01:00
Xinchen Hui 170ee90bf9 Fixed bug that can not get default value of parameter if it's not optional 2012-08-02 22:28:04 +08:00
Xinchen Hui 10642aa9e4 Fixed bug #62715 (ReflectionParameter::isDefaultValueAvailable() wrong result) 2012-08-01 20:23:30 +08:00