×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

Which is the correct syntax of defining a default argument value in PHP?

104. Which is the correct syntax of defining a default argument value in PHP?

  1. function function_name(type $argument_name : value) { /* function body*/ }
  2. function function_name(type $argument_name , value) { /* function body*/ }
  3. function function_name(type $argument_name = value) { /* function body*/ }
  4. All of the above

Answer: C) function function_name(type $argument_name = value) { /* function body*/ }

Explanation:

The syntax of defining a default argument value in PHP is:

function function_name(type $argument_name = value) { 
/* function body*/ 
}

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.