如果一个类没有__construct

    $test = new Test();
    kint($test);
class Test{
  public $a;
  public $b;
}
-----
则任然是会生成一个对象,但是属性有没有有值就看定义类的时候是怎么定义的有没有初始值。

$args array(1)
Drupal\debug_test_demo\Controller\Test(2)
public a -> NULL
public b -> NULL
posted @ 2018-03-27 17:06  qqisnow2021  阅读(213)  评论(0)    收藏  举报