weissersand In addition to https://community.devsense.com/d/2438-highligt-compiler-optimized-functions : native PHP functions, classes, constants (but not: magical constants, language constructs) might be called with backslash. See https://www.deviaene.eu/articles/2023/why-prefix-php-functions-calls-with-backslash/ for better explanation and performance difference. E.g. inside a method: \curl_share_init_persistent([\CURL_LOCK_DATA_DNS, \CURL_LOCK_DATA_CONNECT]);
JakubMisek weissersand , thank you for the suggestion. What would you highlight in the code below? \curl_share_init_persistent([\CURL_LOCK_DATA_DNS, \CURL_LOCK_DATA_CONNECT]);
weissersand JakubMisek Having e.g. curl_share_init_persistent([CURL_LOCK_DATA_DNS, CURL_LOCK_DATA_CONNECT]); might hind to add \ to get result mentioned in post 1.
weissersand In short: Propose \ for all native PHP functions/classes/constants. Further information: https://tideways.com/profiler/blog/we-tried-backslashing-all-the-functions
JakubMisek @weissersand, that's correct, fully qualifying all the global functions actually improves PHP performance. We'll add that as well.
JakubMisek It looks like we already suggest \ for all global functions, e.g.: Thank you for the suggestions. Closing the issue, and if there will be anyting else, please feel free to start a new topic.
weissersand <?php namespace test; curl_share_init_persistent([CURL_LOCK_DATA_DNS, CURL_LOCK_DATA_CONNECT]); \curl_share_init_persistent is proposed, but \CURL_LOCK_DATA_DNS, \CURL_LOCK_DATA_CONNECT is not.