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’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 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 […]
a closer look at php 8.2 feature Union Types
This is the most asked question I have seen in the past few months so I thought I would collect some samples here:
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 […]
“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 […]