Which of the following are valid function names? 1. function() 2. €() 3. .function() 4. $function()
A. Only 2
B. None of the mentioned
C. All of the mentioned
D. 3 and 4
Answer: Option A
Solution(By Examveda Team)
Except a) others are invalid names. According to the specified regular expression ([a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*), a function name like this one is valid.Related Questions on Functions
Which one of the following is the right way of defining a function in PHP?
A. function { function body }
B. data type functionName(parameters) { function body }
C. functionName(parameters) { function body }
D. function fumctionName(parameters) { function body }
A. Call By Value
B. Call By Reference
C. Default Argument Value
D. Type Hinting
Join The Discussion