You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
`ReflectionParameter::getDefaultValueConstantName()` was being overloaded to do
things it was not supposed to do.
http://php.net/manual/en/reflectionparameter.getdefaultvalueconstantname.php
Currently it just returns the raw text for a default value. It should only
return the text if the default value is a *constant*.
If we have:
```
define("MY_CONST", 4);
function foo($a = MY_CONST, $b = MY_CONST * MY_CONST, $c = array(MY_CONST));
```
`ReflectionParameter::getDefaultValueConstantName()` should only return a value
for `$a`. Not the others, like it is now.
So our custom `ReflectionParameter::getDefaultValueText()` should not have been deprecated.
Reviewed By: fredemmott
Differential Revision: D2831292
fb-gh-sync-id: f6a5534d74687d10f3ca9cd955f7601630fd988f
http://3v4l.org/lGLlf
Relevant for #3812
The text was updated successfully, but these errors were encountered: