Top "Spl" questions

SPL is a collection of PHP interfaces and classes that are meant to solve standard problems.

What is Autoloading; How do you use spl_autoload, __autoload and spl_autoload_register?

I am learning advanced PHP standards and trying to implement new and useful methods. Earlier I was using __autoload just …

php autoload spl
How can I sort arrays and data in PHP?

This question is intended as a reference for questions about sorting arrays in PHP. It is easy to think that …

php arrays sorting object spl
How does RecursiveIteratorIterator work in PHP?

How does RecursiveIteratorIterator work? The PHP manual has nothing much documented or explained. What is the difference between IteratorIterator and …

php iterator spl
"Indirect modification of overloaded element of SplFixedArray has no effect"

Why the following $a = new SplFixedArray(5); $a[0] = array(1, 2, 3); $a[0][0] = 12345; // here var_dump($a); produces Notice: Indirect modification of overloaded element …

php arrays spl
Iterate in reverse through an array with PHP - SPL solution?

Is there an SPL Reverse array iterator in PHP? And if not, what would be the best way to achieve …

php reverse loops spl
Why am I getting Fatal error when calling a parent's constructor?

I am extending one of the SPL (Standard PHP Library) classes and I am unable to call the parent's constructor. …

php oop constructor spl
Difference between DirectoryIterator and FileSystemIterator

PHP 5 introduced DirectoryIterator, and PHP 5.3 introduced FileSystemIterator. FileSystemIterator extends DirectoryIterator, but the documentation fails to say what extra features it …

php spl
How to use RegexIterator in PHP

I have yet to find a good example of how to use the php RegexIterator to recursively traverse a directory. …

php regex iterator spl
RuntimeException SplFileInfo::getSize(): stat failed for... Laravel 4 upload image

I work with laravel 4 (last update), I create a form where we could upload an image (logo/avatar). I am …

php file-upload laravel-4 spl splfileobject
Extending ArrayObject in PHP properly?

Problem: I am trying to extend PHP's ArrayObject as shown below. Unfortunately I can't get it to work properly when …

php arrays oop spl arrayobject