Most voted "spl" questions
SPL is a collection of interfaces and classes that serve to solve standard problems.
Learn more…7 questions
Sort by count of
-
5
votes2
answers4997
viewsWhat are the differences between __autoload and spl_autoload_register?
In php, we have two methods of making one autoload class: __autoload function Example: function __autoload($class_name) { require_once $class_name . '.php'; } $obj = new MyClass1(); $obj2 = new…
-
3
votes0
answers35
viewsFlags of the Arrayiterator
I don’t understand what really makes the flags STD_PROP_LIST and ARRAY_AS_PROPS when configured I looked for some examples, but the explanation was a bit confusing for me, I’m beginner in php…
-
2
votes1
answer244
viewsIs it possible to make a Class accessible in all namespaces?
The question is similar to this Instantiate class outside namespace and has a good answer /a/68198/3635 However I would like to do this automatically. For example: It is possible to make a Class be…
-
2
votes1
answer55
viewsclass_exists is running spl_autoloader_register
I created a simple script to automatically load classes using spl_autoload_register, but I noticed a strange behavior when I use class_exists the spl_autoload_register is executed, example: <?php…
-
1
votes1
answer134
viewsWhat’s the Splstack class for?
According to the PHP: The Splstack class provides the main functionalities of a stack implemented using a doubly Linked list. What do you mean: The Splstack class provides the key functionalities of…
-
0
votes1
answer35
viewsUndefined $class_name in autoloader using spl_autoloader_register() with WAMP?
I’m trying to implement an autoloader for classes in my project, but I can’t make that code work... It returns the $class_name variable as Undefined. function autoload_classes( $class_name ) { if (…
-
0
votes0
answers280
viewsProblem in Autoload PHP
I’m starting to POO and SPL and recently faced the following problem: I have the following file that makes the whole bootstrapping of my application init.php, and in it, I do the autoload of all…