-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Remove UNEXPECTED from typed property checks #13143
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
Conversation
Please review carefully, I did my best, but there might be more places to remove. Also, I wonder if any improvement can benchmarked. If this really help, maybe all |
A zend_type is complex nearly all the time. As a type that contains a class name will also be considered complex, the only types which are simple are ones that just contain built-in types (and those can be unions) so no. Having a type be complex is extremely common. |
I would be great to see how this affects performance of different applications. |
I don't see any visible performance difference on bench.php, wordpress, symfony hello and symfony demo. |
If my understanding of the change is correct, the So no huge change is expected, I wonder if there will be any significant performance difference if all EXPECTED/UNEXPECTED will be dropped or even swapped. |
Not only swapped, but also sometime move unexpected code into I don't object against this. |
I checked that when we last spoke about this, and it doesn't seem like any of the |
If there are no more questions let's merge this PR, I have no write permission to do it by myself. |
I don't object. |
Thanks @mvorisek! |
as pointed out in #13100 (comment)
currently, I would say typed properties are even more used than non-typed :)