Q:

If I already had a Debug class in the main namespace. What will be the output of the following code?

belongs to collection: OBJECT TOOLS AND VARIABLES IN PHP MCQ

0

If I already had a Debug class in the main namespace. What will be the output of the following code?

namespace main;
use com\getinstance\util\Debug;
<pre lang="php" cssfile="hk1_style" >
class Debug {
    static function helloWorld() {
        print "hello from main\Debug";
    } 
}
 
Debug::helloWorld();

  1. error
  2. hello from main
  3. hello from main\\Debug
  4. debug

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

(a).error

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

OBJECT TOOLS AND VARIABLES IN PHP MCQ

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Which one of the following statements is true for ... >>
<< Which keyword can be used to fix the above error?...