Challenge: Removing Errors with PHP 8 Error-Handling Techniques
A hands-on exercise to test your knowledge of the new PHP 8’s error-handling enhancements.
This challenge will test your understanding of the new PHP 8’s error-handling enhancements. We will apply these concepts to several scenarios to determine which of the following code snippets provides an Error
or Warning
and how to fix it.
Task 1
The task has been divided into two questions, each assessing your knowledge of the ideas covered. We will apply these concepts to this task to identify whether the code produces an Error
or Warning
and resolve it.
Question 1
Answer the following question.
Get hands-on with 1200+ tech skills courses.