时间:2021-07-01 10:21:17 帮助过:13人阅读
class bass { function __construct() { $this->_initialize(); } function _initialize() { static $v; @$v++; if($v == 1 && method_exists($this, 'initialize')) $this->initialize(); }}class a extends bass { function initialize() { echo __CLASS__; }}class b extends bass { function initialize() { echo __CLASS__; }}$obj = new a();$obj = new a();$obj = new a();$obj = new b();$obj = new b();$obj = new b();ab
class bass { function __construct() { $this->_initialize(); } function _initialize() { static $v; @$v++; if($v == 1 && method_exists($this, 'initialize')) $this->initialize(); }}class a extends bass { function initialize() { echo __CLASS__; }}class b extends bass { function initialize() { echo __CLASS__; }}$obj = new a();$obj = new a();$obj = new a();$obj = new b();$obj = new b();$obj = new b();ab
@$v++;
问一下这句为什么要加“@”符合?