
===================》废话不多说,代码走你《================
<?php
header('content-type:text/html;charset=utf-8');
class Phper{
private $age;
private $sal;
private $payoff;
public function __construct(){//析构函数
$this->payoff=new Payoff();//实例化对象
}
public function getage(){
return $this->age;
}
public function setage($age){
$this->age=$age;
}
//得到工资
public function getsal(){
$this->sal=$this->payoff->figure($this);//结合下面的我通过$