Chapter 10: Improving Performance
PHP 8.x introduces a number of new features that have a positive effect on performance. Also, a number of internal improvements, especially in array handling and managing object references, lead to a substantive performance increase over earlier PHP versions. In addition, many of the PHP 8 best practices covered in this chapter lead to greater efficiency and lower memory usage. In this chapter, you'll discover how to optimize your PHP 8 code to achieve maximum performance.
PHP 8 includes a technology referred to as weak references. By mastering this technology, discussed in the last section of this chapter, your applications will use far less memory. By carefully reviewing the material covered in this chapter and by studying the code examples, you will be able to write faster and more efficient code. Such mastery will vastly improve your standing as a PHP developer and result in satisfied customers, as well as improving your career potential...