PHP inheritance contruct function didn't work : Please check my isssue i make a script but $contractempsal variable didn't work. i want employee salary but i got error. please check.

Follow is my code:-

    <?php

    class baseemp {
	
	protected $firstname;
	protected $lastname;
	
    public function getfullname() {
	
	return $this->firstname .''. $this->lastname; 
	
	}	

     public function __construct($first,$last) {
	
	$this->firstname="$first";
	$this->lastname="$last";
	} 	
	
	}

     class fulltimeemp extends baseemp {
	
	public $monthlysal;
	
     public function monthlysalary() {
	
	$this->monthlysal/12;
	
	}	
    }

      class contractemp extends baseemp {
	

	public $hourlyrate;
	public $totalhours;
	
      public function monthlysalaryy() {
	
	
	$this->hourlyrate * $this->totalhours;
      }
       public function __construct($hourrate,$totalhoursd){
	
	$this->hourlyrate="$hourrate";
	$this->totalhours="$totalhoursd";
	
	}	
      }

       $fulltimeemployee = new fulltimeemp("kannu"," singh");
        $contractempsal = new contractemp("400","5");

       echo $fulltimeemployee->getfullname();

       echo $contractempsal->getfullname();

        ?>

So, this is my code. please check and tell me where i am wrong Thanks

Please check my isssue i make a script but $contractempsal variable didn't work. i want employee salary but i got error. please check.