PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Which of the following is incorrect?
Answers: (choose 4)
a) function c(MyClass $a = new MyClass())
b) function d($a = null)
c) function e(&$a = 30)
d) function a(&$a = array(10,20,30))
e) function b($a = (10 + 2))
According to the exam, four are wrong and one is right. It seems that A and E are definitely wrong. But B, C, and D don't give any errors. Can anyone shed some light on this?
This is a mock test for the PHP 5 certification that you can order from Zend.com. It appears they made a mistake on this question. So, the only incorrect answers are A and E, right?