autoload那個地方似乎有點問題,我試了一下,如果調(diào)用spl_autoload_register()方法后如果找不到類的話是不會再去調(diào)用__autoload()方法了,而是直接拋錯,這點老師確認一下。
2014-12-09
class_parents() class_implements() iterator_count() iterator_apply() iterator_to_array()
2014-11-20
確實之前是使用function __autoload($class_name){}函數(shù)實現(xiàn)自動加載 現(xiàn)在回過頭來終于發(fā)現(xiàn)當初的代碼為什么會和PHPExcel的自動加載方式有沖突了 統(tǒng)一使用spl_autoload_*()方法就可以避免此類問題
2014-11-20
sql_autoload_extension('.class.php,.inc.php');
可以使用逗號進行分割
可以使用逗號進行分割
2014-11-20
array_walk() iterator_apply() 為迭代器中每個元素調(diào)用一個用戶自定義的函數(shù)
2014-11-20
繼承了implements Countable接口,實現(xiàn)了count()方法 就可以使用count($obj)進行計算
2014-11-20
$a = new ArrayIterator(array('a','b','c'));
$b = new ArrayIterator(array('d','e','f'));
$it = new AppendIterator()->append($a)->append($b);
$b = new ArrayIterator(array('d','e','f'));
$it = new AppendIterator()->append($a)->append($b);
2014-11-20
$it = new ArrayObject()->getIterator();
foreach($it as $key=>$value)
foreach($it as $key=>$value)
2014-11-20