测试代码:
<?php
$a = new controller;
$a->test();
class controller{
public $menuList = time();
public function test(){
echo $this->menuList;
}
}
?>
这样会报错的,为什么
测试代码:
<?php
$a = new controller;
$a->test();
class controller{
public $menuList = time();
public function test(){
echo $this->menuList;
}
}
?>
这样会报错的,为什么