Seldaek / monolog

Sends your logs to files, sockets, inboxes, databases and various web services
https://seldaek.github.io/monolog/
MIT License
20.95k stars 1.9k forks source link

Use fully-qualified name for native functions #1887

Closed dreis2211 closed 2 months ago

dreis2211 commented 4 months ago

Hi,

as this is my first PR in this project and I have't found a contributing guideline, please let me know in case you need anything from me.

This PR makes use of fully-qualified names for native functions - aka prefixing them with \ - to allow optimizations through the engine. This is definitely a micro-optimization and I haven't measured it here, but it's a relatively common optimization in the PHP world these days, so I hope this is considered. E.g see https://php.watch/articles/php-zend-engine-special-inlined-functions

Cheers, Christoph

Seldaek commented 2 months ago

As much as I hate these \s, I guess it makes sense to do it in this project, thanks.