Best Practices for Data Serialization in PHP

In the world of PHP programming, the functions serialize() and unserialize() have long been relied upon for converting complex data structures into strings. They are great at performing the function they were designed to do: convert PHP objects into a string that can be stored in a database or file. These strings can then be…

Preventing Symfony Process From Passing Laravel Environment Variables

Recently when working on an internal tool using Laravel, we encountered an issue where calling artisan commands in another application was using the wrong environment variables. After debugging, we determined that this was default behavior of the Symfony process class. The Symfony process class for PHP is able to call system processes from within your…

PHP 8.1 Has Been Released—See What’s New

PHP 8.1 was released on November 25, 2021. It contains several new features to make developing in PHP even nicer. PHP 8.1 is a major update that PHP.net says “comes with numerous improvements and new features such as: Enumerations Readonly properties Fibers Pure Intersection Types never return type First-class Callable Syntax “final” modifier for class…