-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReflectionFunctionAbstract::getTentativeReturnType called on reflection function #4386
Comments
Sorry, I don't quite understand what your question is. Can you please clarify? |
In the page there is this example of usage
This function is defined in ReflectionFunctionAbstract, so it can be called also for "normal" function
It is the intended usage? This part of documentation is pretty obscure |
Ah, I don't think that normal functions can have a tentative return type, as this is only really an issue for methods of non-final classes. @kocsismate do you know why it was added to FunctionAbstract? |
I think it was just an oversight :/ |
Maybe it's "let's implement in there, just in case" |
From manual page: https://php.net/reflectionfunctionabstract.gettentativereturntype
In the manual page there is an example of the function ::getTentativeReturnType called upon a reflection method.
There is no example with a standard function
Has it sense applying this concept to standard function?
The text was updated successfully, but these errors were encountered: