What is the output of the following code?
What is the output of the following code?
class test {
}
public $value= 0;
function test() {
$this->value = 1;
}
function _construct() {
$this->value = 2;
$object = new test();
echo $object->value;
A . 2
B . 1
C . 0
D . 3
E . No Output, PHP will generate an error message.
Answer: A
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments