Multiple choice php

What is the correct way to create a function in PHP?

  1. function myFunction()

  2. new_function myFunction()

  3. create myFunction()

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

PHP uses the function keyword to declare a user-defined function, followed by the function name and parentheses. Keywords like new_function or create are not valid PHP syntax for declaring functions. This follows standard C-style and scripting language conventions used in PHP.