Standard PHP Library "topics"

Source: Internet
Author: User
Tags spl
Standard PHP Library "Special topic"

Standard PHP Library

? ? Standard PHP library abbreviation spl,php. It is a set of interfaces and classes that are used to solve typical (common) problems. SPL mainly includes data structures, basic interfaces, basic functions, iterators, exceptions, and several other aspects. Frequently asked questions are:

?

  1. Mathematical modeling, data structure (solving the problem of how data is stored)
  2. Element traversal (data How to view problems)
  3. Unified invocation of common methods (including common methods [array, collection size], and custom traversal)
  4. Automatic loading of classes (PHP adapts to the management requirements of large-scale projects, dispersing the functionality into different files)

First, SPL commonly used data structure

?

?? ? ? ?

??

Second, SPL commonly used iterators

?

? 1. Arrayiterator iterator interface for traversing arrays

Convert the array of for, while, and foreach traversal into iterator to traverse.

?

? 2. Appenditerator can traverse several iterators in succession

? 3. Multipleiterator users to combine data from multiple iterator into one overall access

? 4, Outeriterator

?

Third, SPL basic interface

Iv. Common functions of SPL

?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.