×

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

What will be the output of the following PHP code (1)?

18. What will be the output of the following PHP code?

<?php
$x = 5;

function myFunction(){
    echo "Result $x";
}
myFunction();
?>
  1. Result $x
  2. Result 5
  3. Result
  4. None of the above

Answer: C) Result

Explanation:

The variable x is a global variable, and can only be accessed outside a function.

Comments and Discussions!

Load comments ↻




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