Multiple choice technology web technology

Which is the problem with the following code using PHP5?

  1. Object attributes are not of any specific data type

  2. The constructor of the class is not correctly defined

  3. You cannot put an equal when recieving a parameter in the constructor

  4. The word function is missing before the class constructor

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

In PHP 5, class constructors must be declared with the 'function' keyword before __construct() or the class-name method. The constructor is a special method that's automatically called when an object is instantiated, but it still requires standard function declaration syntax.