摘要:
<?php class A { private $_b; public function __construct($b) { $this->_b = $b; } public function sayHello() { echo 'I am A'; $this->_b->sayHello(); } 阅读全文
摘要:
<?php class User { public $id; public $name; public $age; private $_db; public function __construct($id) { $this->_db = new MySQLi(); $conn = $this->d 阅读全文
摘要:
class CustomIterator implements Iterator { private $_data; private $_index = 0; public function __construct($data) { $this->_data = $data; } /** * 返回当 阅读全文