摘要:
//最大堆 $heap = new \SplMaxHeap(); $heap->insert("data1"); $heap->insert("data2"); // echo $heap->extract(); //最小堆 $heap = new \SplMinHeap(); $heap->ins 阅读全文
摘要:
//阵列 创建固定长度的数组----定长数组 $arr = new SplFixedArray(4); $arr[0] = 'php'; $arr[1] = 1; $arr[3] = 'python';//遍历, $arr[2] 为null foreach($arr as $v) { echo $v 阅读全文