[web-php] PR #608: Micro Optimizations - Round #2
| From: | Ayesh | Date: | Sun, 03 Jul 2022 18:22:15 +0000 |
| Subject: | [web-php] PR #608: Micro Optimizations - Round #2 | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-30240@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/web-php/pull/608
Author: Ayesh
Follow-up to #603, includes a few more optimizations.
- [.gitignore: Remove redundant
entry](https://github.com/php/web-php/commit/9c77a3cf1293651356ef1e68233d2ace3d2b76d2)
- [Minor optimizations with ternary
operators](https://github.com/php/web-php/commit/24406af9c96edac1fd48cb7cdbd933cf7214a1bd)
- [Use const instead of define() where
appropriate](https://github.com/php/web-php/commit/4b337aea819119792e4e5c889c2a0614620a693e)
const is quite faster because of the compile-time optimizations. Because the
replaced statements are not declaring constant conditionally, it's safe to use
const in all of these places.
Thank you.