×

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 function return type in PHP?

105. Which is the correct syntax of defining function return type in PHP?

  1. function function_name(type $arguments) : return_type { /* function body*/ }
  2. function function_name(type $arguments) , return_type { /* function body*/ }
  3. return_type function function_name(type $arguments) { /* function body*/ }
  4. function return_type function_name(type $arguments) { /* function body*/ }

Answer: A) function function_name(type $arguments) : return_type { /* function body*/ }

Explanation:

The syntax of defining function return type in PHP is:

function function_name(type $arguments) : return_type { 
/* function body*/ 
}

Comments and Discussions!

Load comments ↻




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