av一区二区在线观看_亚洲男人的天堂网站_日韩亚洲视频_在线成人免费_欧美日韩精品免费观看视频_久草视

您的位置:首頁技術文章
文章詳情頁

PHP擴展之PHP標準庫(SPL)概述

瀏覽:55日期:2022-09-15 17:44:24

SPL是用于解決典型問題(standard problems)的一組接口與類的集合。

此擴展只能在php 5.0以后使用,并且從PHP 5.3.0 不再被關閉,會一直有效,成為php內核組件一部份。

數據結構

SPL提供了一組標準數據結構。

雙向鏈表

雙向鏈表 (DLL) is a list of nodes linked in both directions to each others. Iterator’s operations, access to both ends, addition or removal of nodes have a cost of O(1) when the underlying structure is a DLL. It hence provides a decent implementation for stacks and queues.

SplDoublyLinkedListSplStackSplQueue

Heaps are tree-like structures that follow the heap-property: each node is greater than or equal to its children, when compared using the implemented compare method which is global to the heap.

SplHeapSplMaxHeapSplMinHeapSplPriorityQueue

陣列

Arrays are structures that store the data in a continuous way, accessible via indexes. Don’t confuse them with PHP arrays: PHP arrays are in fact implemented as ordered hashtables.

SplFixedArray

映射

A map is a datastructure holding key-value pairs. PHP arrays can be seen as maps from integers/strings to values. SPL provides a map from objects to data. This map can also be used as an object set.

SplObjectStorage迭代器

SPL 提供一系列迭代器以遍歷不同的對象。

ArrayIteratorRecursiveArrayIteratorEmptyIteratorIteratorIteratorAppendIteratorCachingIteratorRecursiveCachingIteratorFilterIteratorCallbackFilterIteratorRecursiveCallbackFilterIteratorRecursiveFilterIteratorParentIteratorRegexIteratorRecursiveRegexIteratorInfiniteIteratorLimitIteratorNoRewindIteratorMultipleIteratorRecursiveIteratorIteratorRecursiveTreeIteratorDirectoryIterator?(extends?SplFileInfo)FilesystemIteratorGlobIteratorRecursiveDirectoryIterator接口

SPL 提供一系列接口。

CountableOuterIteratorRecursiveIteratorSeekableIteratorSplObserverSplSubject異常

SPL 提供一系列標準異常。

LogicException?(extends?Exception)BadFunctionCallExceptionBadMethodCallExceptionDomainExceptionInvalidArgumentExceptionLengthExceptionOutOfRangeExceptionRuntimeException?(extends?Exception)OutOfBoundsExceptionOverflowExceptionRangeExceptionUnderflowExceptionUnexpectedValueExceptionSPL函數class_implements?— 返回指定的類實現的所有接口。class_parents?— 返回指定類的父類。class_uses?— Return the traits used by the given classiterator_apply?— 為迭代器中每個元素調用一個用戶自定義函數iterator_count?— 計算迭代器中元素的個數iterator_to_array?— 將迭代器中的元素拷貝到數組spl_autoload_call?— 嘗試調用所有已注冊的__autoload()函數來裝載請求類spl_autoload_extensions?— 注冊并返回spl_autoload函數使用的默認文件擴展名。spl_autoload_functions?— 返回所有已注冊的__autoload()函數。spl_autoload_register?— 注冊__autoload()函數spl_autoload_unregister?— 注銷已注冊的__autoload()函數spl_autoload?— __autoload()函數的默認實現spl_classes?— 返回所有可用的SPL類spl_object_hash?— 返回指定對象的hash id文件處理

SPL 提供 一些與文件相關的類。

SplFileInfoSplFileObjectSplTempFileObject其他類及接口ArrayObjectSplObserverSplSubject
標簽: PHP
相關文章:
主站蜘蛛池模板: 日韩三级在线 | 视频三区| 日韩中文字幕网 | 亚洲国产精品一区 | 亚洲社区在线 | 久久99久久99| 中文字幕一区在线观看视频 | 欧美在线日韩 | 在线免费观看成人 | 在线三级电影 | 精区3d动漫一品二品精区 | 国产精品二区三区 | 欧产日产国产精品99 | 久久精品成人 | 久国久产久精永久网页 | 黄色一级免费 | 91精品国产欧美一区二区 | 一区二区免费在线观看 | 91久久综合亚洲鲁鲁五月天 | 看羞羞视频免费 | 超碰在线国产 | 亚洲精品一区二区三区中文字幕 | 伦理午夜电影免费观看 | 国产区精品 | 日本一区二区在线视频 | 国产传媒 | 亚洲综合日韩精品欧美综合区 | 国产精品色一区二区三区 | 精品一区二区电影 | 日本亚洲一区二区 | 久久国内精品 | 正在播放国产精品 | 亚洲天堂一区 | 中日韩毛片| 麻豆一区 | 97起碰| 亚洲欧美日韩电影 | 亚洲一区国产 | 亚洲国产成人精品女人久久久 | 国产aⅴ | 99精品久久 |