200-550 Web TestEngine demo

Exit VCEDump 200-550 Zend Certified PHP Engineer
Question 8 of 34
0% complete
Q8 Single choice

Given the following code, what will the output be:

trait MyTrait {
private $abc = 1;
public function increment() {
$this->abc++;
}
public function getValue() {
return $this->abc;
}
}
class MyClass {

use MyTrait;
public function incrementBy2() {
$this->increment();
$this->abc++;
}
}
$c = new MyClass;
$c->incrementBy2();
var_dump($c->getValue());

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in