If I Already Had A Debug Class In The Main Namespace What Will #368
If I already had a Debug class in the main namespace. What will be the output of the following PHP code?</p> <pre><code class="language-php" line="1"> namespace main; use com\getinstance\util\Debug; class Debug { static function helloWorld() { print "hello from main\Debug"; } } Debug::helloWorld(); </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs107 PHP: Hypertext Preprocessor. It can also be found in gs gs107 PHP Object Tools and Design - PHP Object Tools - Quiz No.1.
If I already had a Debug class in the main namespace. What will be the output of the following PHP code?
namespace main; use com\getinstance\util\Debug; class Debug { static function helloWorld() { print "hello from main\Debug"; } } Debug::helloWorld();
error
hello from main
hello from main\Debug
debug