考虑以下因素:
<?php
class Tiger {
static $stripes;
}
?>
Tiger::$stripes
的价值是什么?
答案 0 :(得分:0)
null
Tiger::$stripes
将为null
<?php
class Tiger {
static $stripes;
}
var_dump( Tiger::$stripes );
?>
输出:
NULL
因此,$ stripe的这两个声明是等价的:
static $stripes = null;
// (equivalent)
static $stripes;