PHP language tutorials

Home >> PHP language

 How does the autoload works in PHP

This article will explain what is the benefit of autoloader in PHP and how it works. We know that we can use some functions to include code from other files in a file we are working on. These are the functions: include include_once require require_once Now, imagine we have this file tree in o   read more >>

 PHP __autoload

This article will provide you a detailed explanation about __autoload, its limitation and solution.  __autoload is generally considered obsolete. It only allows for a single autoloader. Let's me explain using an example of __autoload. Even I have never been using this function, j   read more >>

 PHP spl_autoload_register

This article will provide you a detailed explanation about spl_autoload_register(). spl_autoload_register() allows several autoloaders to be registered which will be run through in turn until a match is found. Now, imagine we have this file tree in our application: classes/ user.php order/   read more >>

 PHP spl_autoload_register vs __autoload

This article will explain difference between spl_autoload_register vs __autoload. __autoload is generally considered obsolete. It only allows for a single autoloader. Generally, you should only use __autoload if you're using a version of PHP without support for spl_autload_register. spl_autolo   read more >>

 Storing PHP sessions in a database

This article will explain how to Store PHP Sessions in a Database. Basically, we can store session in a file or database. Why is it good save to save sessions in the database? The primary difference is that fetching the session info from a database can be quite a bit faster than from a file system   read more >>