phpクラス属性付与疑惑

816 ワード

テストコード:
<?php $a = new controller; $a->test(); class controller{ public $menuList = time(); public function test(){ echo $this->menuList; } } ?>

これは間違っています.どうしてですか.