Menu Home

PHP 8.2: null, false, and true as stand-alone types

php 8.2

PHP 8.2 introduces a new feature that allows you to use null, true, and false as stand-alone types for function arguments and return values. This means you can be more explicit with your type hints and make your code easier to understand for other developers.

PHP tempfile function

PHP’s tempfile() function is a useful tool for creating temporary files that are automatically deleted when the PHP script finishes executing. This can be useful in cases where you need to store data temporarily, such as when processing a large amount of data that cannot fit in memory. To create […]

PHP 8.2 : Readonly Classes

php 8.2

PHP 8.2 introduces a new feature called readonly classes, which allow developers to mark certain class properties as read-only. This means that once a property has been set, it cannot be changed by any code within the class or its descendants. To mark a property as read-only, developers can use […]

Create a Discord Bot Using Asynchronous PHP in 4 steps

Intro The landscape right now for Discord bots is filled with python and javascript. These work well but what about our beloved PHP? There is a project named Discord-PHP which bridges the gap for us using asynchronous PHP to keep our bot alive. Prerequisites PHP 7.2 or higher Composer ext-json […]

PHP filter functions

man in grey sweater holding yellow sticky note

Filtering in PHP is super easy with the built in filter_var() function. Filtering is essential when taking in form input or applying logic to any set of data. This is especially crucial when sanitizing user input in order to prevent XSS and Sql injection attacks. filter_var ( mixed$variable [, int $filter = FILTER_DEFAULT [, mixed$options ]] ) : mixed Grab […]

PHP 8.0 Release Candidate Available

“The PHP team is pleased to announce the eighth testing release of PHP 8.0.0, Release Candidate 1.” This RC can be found on the official release site php-8.0.0rc1.tar.bz2 2020-09-29 22:46 13M   php-8.0.0rc1.tar.bz2.asc 2020-09-29 22:46 866   php-8.0.0rc1.tar.gz 2020-09-29 22:46 16M   php-8.0.0rc1.tar.gz.asc 2020-09-29 22:46 866   php-8.0.0rc1.tar.xz 2020-09-29 22:46 […]