统一变量语法
$objects['class']->name$first = ['name'] => 'revin'];
$revin = 'xiaoxiami';
echo $$first['name'];echo ${$first['name']};class Info
{
public $title = 'PHP 7';
public $description = 'PHP 7 descriptions';
public function geTitle() : string
{
return $this->title;
}
public function getDescription() : string
{
return $this->description;
}
}
$methods = ['title' => 'geTitle', 'description' => 'getDescription'];
$object = new Info();
echo 'Info ' . $object->$methods['title']() . ' description : ' . $object->$methods['description']();总结:
间接调用的表达式的新旧解析顺序
Last updated