Summary
In this chapter, you learned about a number of changes introduced by PHP 8 at the procedural level. You first learned about the new nullsafe operator, which allows you to considerably shorten any code in which a chain of object references might fail. You also learned how usage of the ternary operator and the variadics operator has been tightened and improved, and that the concatenate operator has been demoted in the order of precedence. This chapter also covered advantages and disadvantages of arrow functions, as well as how they can be used as a clean and concise alternative to anonymous functions.
Later sections in this chapter showed you how PHP 8 continues the trend toward uniform variable syntax first introduced in PHP 7. You learned how remaining inconsistencies have been addressed in PHP 8, including interpolated string and magic constant de-referencing, as well as improvements in array and string handling that promise to make your PHP 8 cleaner, more concise, and...