Why does peter appear in the browser when I follow the teacher's instructions but not in the teacher's browser?
class Staff{ private $anme; private $age; private $salary;
public function __construct($name,$age,$salary) { $this -> name = $name ; $this -> age =$age; $this -> salary =$salary; }}
$obj =new Staff('peter',28,5000);
echo $obj ->name;
邓2019-11-11 14:08:30
Help you find the reason. Your first variable is declared as $anme, and the output is name