Question:What will be output of the following code?
class test{
  private $a;
  function set($x){
   $this->a =$x;
  }
  public function get(){
   return $this->a;
  }
}

$t1 = new test;
$t1->set(10);
echo $t1->get();
 

A 0 

B 10 

C Error 

D None 

+ Answer
+ Report
Total Preview: 1015

Copyright © 2024. Powered by Intellect Software Ltd