3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class segitiga { protected $alas; protected $tinggi; public function setalas ($a) { $pr=$this->$alas; $pr=10; return $pr; } public function settinggi ($a) { $tgg=$this->$tinggi; $tgg=15; return $tgg; } } class hitmir extends segitiga { protected $miring; private function hit($a) { $mir=($pr*$pr+$tgg*$tgg); } } $ob= new segitiga(); $ob2= new hitmir(); echo PHP_EOL; $ob2->hit;
based on nPlAv
Output for 5.6.38 - 7.3.0rc3
Notice: Undefined property: hitmir::$hit in /in/XTcC9 on line 31