I tried calling multiple functions on a single object. But I got this error
Uncaught Error: Call to a member function dordor()
Could you correct me please?
<?php
class Das
{
public $a= 'mulut';
public $b = 'anda';
public $c = 'kotor';
public function dor(){
echo $this->a.PHP_EOL;
echo $this->b.PHP_EOL;
echo $this->c.PHP_EOL;
echo PHP_EOL;
}
public function dordor(){
echo 'lmao';
echo PHP_EOL;
}
}
$s = new Das();
$s->a = 'mulut';
$s->b = 'anda';
$s->c = 'kotor';
$s
->dor()
->dordor();
?>