Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 587 Bytes

0726.md

File metadata and controls

23 lines (19 loc) · 587 Bytes

What happens when you run the script below ?

$language = 'PHP';
function PHP() {
    return 'This is the ' . __FUNCTION__ . ' function';
}
echo $language();
  • A) The script echoes: "This is the PHP function"
  • B) PHP Parse error: syntax error on line 7
  • C) Notice: Use of undefined constant FUNCTION_ - assumed 'FUNCTION' on line 5
  • D) an exception is thrown
Answer

Answer: A