Question No : 1
What would be the output of the following code?
namespace MyFramework\DB;
class MyClass {
static function myName() {
return __METHOD__;
}
}
print MyClass::myName();
A. MyFramework\DB\myName
B. MyFramework\DB\MyClass\myName
C. MyFramework\DB\MyClass::myName
D. MyClass::myName
Answer: C
Question No : 2
Under what condition may HTTP headers be set from PHP if there is content echoed prior
to the header function being used?
A. headers_sent() returns true
B. Output buffering is enabled
C. The client supports local buffering
D. The webserver uses preemptive mode
Answer: B
Question No : 3
What is the output of the following code?
$a = 'a'; $b = 'b';
echo isset($c) ? $a.$b.$c : ($c = 'c').'d';
A. abc
B. cd
C. 0d
Answer: B
Question No : 4
What purpose do namespaces fulfill?
A. Encapsulation
B. Alternative to classes
C. Improved performance
D. All of the above
Answer: A
Question No : 5
What DOM method is used to load HTML files?
A. load()
B. loadXML()
C. loadHTML()
D. loadHTMLFile()
Answer: D
No comments:
Post a Comment