PHP SPL 库简介

SPL标准 PHP 库,用于解决典型问题的一组接口与类的集合。

数学建模、数据结构

  • 数据怎么存储的问题

元素遍历

  • 数据怎么查看的问题

通用方法(数组、集合大小)

自定义遍历

自动加载

各种形式 回调函数、静态加载类

1
2
3
4
5
6
7
8
9
spl_autoload_register("Test::autoload");

spl_autoload_register(['Test','autoload']);

spl_autoload_register(function($class){});

spl_autoload_register('function_name');

spl_autoload_register( [$autoload_function, $throw, $prepend]);
0%