摘要: ``` $test = new test(); $name = "x + b"; $test->$name = 2; var_dump($test); //$test->x-b; //直接使用上面的属性,会被认为是一个减号,从而引发语法错误 echo $test->{'x-b'}; //这种属性里面有-的这样包一下 ``` 阅读全文
posted @ 2019-10-28 17:30 咳嗽的小鱼 阅读(363) 评论(0) 推荐(0) 编辑