Category: PHP

  • Cheatsheet

    This PHP cheatsheet provides a quick overview and revision of all concepts of PHP programming and is helpful for students and developers as well. If you are preparing for any exam or an interview, we recommend going through this cheatsheet to learn and enhance your PHP skills. Script Syntax Use the below syntax to write…

  • Function References

    PHP is very rich in terms of Built-in functions. Here is the list of various important function categories. There are various other function categories which are not covered here. Select a category to see a list of all the functions related to that category.

  • PDO Extension

    PDO is an acronym for PHP Data Objects. PHP can interact with most of the relational as well as NOSQL databases. The default PHP installation comes with vendor-specific database extensions already installed and enabled. In addition to such database drivers specific to a certain type of database, such as the mysqli extension for MySQL, PHP…

  • FastCGI Process

    PHP FastCGI Process Manager (PHP-FPM) is an efficient alternative to traditional CGI-based methods for handling PHP requests, particularly in high-traffic environments. PHP-FPM has a number of important features. These features are as follows − Reduced Memory Consumption With the help of a pool of worker processes to handle requests PHP-FPM significantly reduces memory overhead compared…

  • CSRF

    The acronym “CSRF” stands for Cross-Site Request Forgery. CSRF is an Internet exploit that involves a trusted website user issuing unauthorized commands. Providing adequate protection to a PHP web application against this attack can be achieved by taking the measures explained in this chapter. By default, the browser uses the “GET” request method to send…

  • PEAR

    PEAR is an acronym for PHP Extension and Application Repository. It is a repository of PHP packages or extensions. You can freely incorporate any of these extensions from PEAR in your code. The PEAR project was established by Stig S. Bakken in 1999. Most of the precompiled distributions of PHP such as XAMPP already have PEAR…

  • Removed Extensions & SAPIs

    With each new version of PHP, new functionality is added and at the same time certain obsolete functionality is removed. PHP version 7 is a major version when a number of PHP extensions and SAPIs (Server-side Application Programming Interface) were removed. In the subsequent PHP 8 version also, a few more extensions have been removed.…

  • Deprecated Features

    As some new features are added with each new version, some features are also removed as they are deemed to be obsolete. In this chapter, we have a look at deprecated features after PHP version 5. Deprecated in PHP Ver 7 PHP 4 Style Constructors PHP 4 style Constructors are methods having same name as…

  • Integer Division

    PHP has introduced a new function intdiv(), which performs integer division of its operands and return the division as int. The intdiv() function returns integer quotient of two integer parameters. If “a/b” results in “c” as division and “r” as remainder such that − a=b*c+r In this case, intdiv(a,b) returns r − intdiv(int$x,int$y):int The $x and $y are the…