PHP类与Json的问题
可是为什么我照这个写的
```
<?php
class muke{
public $name = "protect Name";
protected $ptName = "protected Name";
private $pvName = "private Name";
public function getName($name){
return $this->name;
}
}
$mukeObj = new muke();
$obj2Json = json_encode($mukeObj);
echo $obj2Json
?>
```
运行结果是这样呢
```
name; } } $mukeObj = new muke(); $obj2Json = json_encode($mukeObj); echo $obj2Json ?>
```