=> 是数组成员访问符号
-> 是对象成员访问符号
比如:
$array = array("site map"=>"map.php"); //定义了一个数组,包含一个数组成员:键名为site map,值为map.php ...
=>一般用在数组中例如:$arr=array('1'=>'test1','2'=>'test2');
其中左面表示键名,右面表示键值
->这个是用在类操作中:例如:
class Test()
{
private $t=0;
public function ttt()
{
echo "test";
}
}
$myclass=new Test;
echo $myclass->$t;
$myclass->ttt();