nerdexam
Zend

200-710 · Question #93

Which of the following is NOT a valid function declaration?

The correct answer is D. function x ($x1 = $x2). See the full explanation below for the reasoning.

Functions

Question

Which of the following is NOT a valid function declaration?

Options

  • Afunction x ($x1 = array())
  • Bfunction x (A $x1)
  • Cfunction x (A $x1 = null)
  • Dfunction x ($x1 = $x2)

How the community answered

(64 responses)
  • A
    8% (5)
  • B
    3% (2)
  • C
    11% (7)
  • D
    78% (50)

Topics

#function declaration#default values#type hints#syntax

Community Discussion

No community discussion yet for this question.

Full 200-710 Practice