3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class induk { private $p; private $l; protected $luas; public function input($a,$b) { $this->p=$a; $this->l=$b; } protected function luasp() { return $this->luas=$this->p*$this->l; } public function cetakl() { echo "luas persegi = ". $this->luas; } } $luasss=new induk(); $luasss->input(3,2); $luasss->cetakl();
based on fUulE
Output for 5.6.38 - 7.3.0rc3
luas persegi =