hybridauth
hybridauth copied to clipboard
Replace older-style PHP type conversion functions with type casts
I'm using hybridauth as a library for a WordPress plugin. WordPress is now using direct type casting: https://make.wordpress.org/core/2020/11/20/miscellaneous-developer-focused-changes-in-wordpress-5-6/
In PHP 5 and later direct type casting is available, which is often many times more performant than their function predecessors.
Is this something that HybridAuth should be using?
Thanks
Hello, thanks for recommendation. It makes sense for sure.
So, plan is to replace the following usages:
intval() → (int)
strval() → (string)
floatval() → (float)
Micro optimizations really only make sense for code in the critical path (i.e. called a LOT during a single request), and I would very much doubt that hybridauth code is in the critical path.