How-to articles, tricks, and solutions about PHP
Twig ternary operator, Shorthand if-then-else
In PHP, you can use the ternary operator to perform a shorthand if-then-else statement.
Unique and temporary file names in PHP?
In PHP, you can use the tempnam() function to generate a unique and temporary file name.
Update PHP to 7.4 macOS Catalina with brew
To update PHP to version 7.4 on macOS Catalina using Homebrew, you can use the following steps:
Upgrading PHP in XAMPP for Windows?
To upgrade PHP in XAMPP for Windows, you will need to follow these steps.
Upgrading PHP on CentOS 6.5 (Final)
Upgrading PHP on CentOS 6.5 can be a bit tricky, since CentOS 6.5 uses an older version of PHP.
Upload DOC or PDF using PHP
To upload a DOC or PDF file using PHP, you will need to use the move_uploaded_file function.
Verify ImageMagick installation
To verify that ImageMagick is installed, you can use the command-line tool "convert".
Warning: mysqli_connect(): (HY000/2002): No such file or directory
This error message is indicating that there is a problem connecting to the MySQL server.
Way to get all alphabetic chars in an array in PHP?
You can use the range() function to get all alphabetic characters in an array in PHP.