- Before looking at individual aspects of the standard PHP library, I think it's important to explain what it is. The standard PHP library, or SPL for short, is standard in the sense that there's nothing to install. It's a core part of PHP. It was introduced in PHP 5.0, so it's been part of the language since 2004. Originally, it was possible to compile PHP without the SPL. But since PHP 5.3, it's become a default component and can't be disabled.
Although it's called a library, SPL is not another framework like Symfony or CakePHP. So, what is it? According to the PHP online documentation, the standard PHP library (SPL) is a collection of interfaces and classes that are meant to solve common problems. At the time of recording this video, that's all it says. It's accurate, but not very helpful. So, let's take a look at the main index. The SPL defines a series of data structures such as doubly linked lists, stacks, queues and heaps.
It also defines a large number of iterators for looping over arrays, objects, and the system file structure. If I scroll down to the bottom of this page, we can see that there are three classes that are dedicated to file handling. One of the problems with the SPL, is that the documentation isn't as user friendly as other core parts of PHP. So, that's the idea behind this course, to lift some of the mystery and to help you explore the secrets of the SPL beginning with iterators.
Author
Released
10/22/2014- Using SPL iterators
- Inspecting directories
- Working with text files
- Exporting and extracting data
- Filtering data
- Converting between arrays and iterators
- Combining and merging iterators
- Creating a repeat sequence with InfiniteIterator
- Working with data structures
Skill Level Intermediate
Duration
Views
Related Courses
-
Advanced PHP: Debugging Techniques
with Jon Peck1h 29m Intermediate -
PHP: Exporting Data to Files
with David Powers3h 42m Intermediate
-
Introduction
-
Welcome59s
-
-
1. Introducing the Standard PHP Library (SPL)
-
Introducing SPL iterators1m 59s
-
Using SPL iterators2m 6s
-
2. Exploring Files and Directories
-
3. Filtering Values
-
4. Array Iterators
-
Filtering values from JSON4m 45s
-
5. Combining and Merging Iterators
-
6. Other Iterators
-
7. SPL Data Structures
-
Using SplStack and SplQueue6m 25s
-
Understanding heaps2m 55s
-
Conclusion
-
Goodbye1m 37s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: What is the Standard PHP Library?