Research & Documentation 05 Php8
Feature 1
One of the new features in PHP 8 is the str_starts_with() function. This function checks if a string starts with another string and will return the boolean value of true or false. It was possible to accomplish this with other functions in PHP before, but it was not an easy task. It is now much more simple with this new function.
Feature 2
The token_get_all() function is another new feature of PHP 8. This function now returns an array of objects instead of a single character string or an array with a token ID (which is what it had done previously). With this new feature, memory usage is also reduced.
Feature 3
The function get_debug_type() is also a new feature of PHP 8. This function returns the given type of a variable. Unlike the function gettype() which has been used for this purpose previously, the get_debug_type() function will return native type names (such as "int" instead of "integer").
Summary
Overall, PHP 8 has many new features, optimizations, and improvements that have been made since previous versions. These are only just a few of them and there are many, many more!