PHPnews.io

Overview for 'stitcher-io'

PHP in 2022

Written by Stitcher.io / Original link on Jan. 11, 2022

It's the fourth time I'm writing a yearly "PHP in 20XX" post, and I must admit I've never been as excited about it as this year: we've seen awesome new features added to PHP, with stuff like attributes, enums, promoted properties and fibers; and on top of that, the static analysis community is maki…


PHP version stats: January, 2022

Written by Stitcher.io / Original link on Jan. 10, 2022

It's that time again: my biyearly summary of which PHP versions are used across the community. It's been 6 months since my previous post and during that time PHP 8.1 was released. It'll be interesting to see some numbers on this newest version as well. As always, it's important to note that I'm wor…


Upgrade to PHP 8.1 with Homebrew on Mac

Written by Stitcher.io / Original link on Nov. 26, 2021

Do you want to learn more about PHP 8.1? There's The Road to PHP 8.1. For the next 10 days, you'll receive a daily email covering a new and exiting feature of PHP 8.1; afterwards you'll be automatically unsubscribed, so no spam or followup. Subscribe now! # Upgrading with Homebrew Start by making…


PHP 8.1: real-life performance benchmarks

Written by Stitcher.io / Original link on Nov. 25, 2021

I did a very quick performance test because I wanted to know the impact of PHP 8.1 on my real-life projects. These benchmarks were taken on my local machine, and only meant to measure the relative difference between PHP 8.0 and 8.1. I benchmarked a page that showed lots of data, with lots of classe…


PHP 8.1 in 8 code blocks

Written by Stitcher.io / Original link on Nov. 7, 2021

enum Status { case draft; case published; case archived; public function color(): string { return match($this) { Status::draft => 'grey', Status::published => 'green', Status::archived => 'red', }; } } Enums class PostData { public function __construct( public readonly string $title, publi…


Generics in PHP (video)

Written by Stitcher.io / Original link on Nov. 6, 2021

I made this video about generics last week, you can watch it (make sure to like and subscribe if you liked it), or you can read the transcript here if you don't like watching videos. Also make sure to share your opinions on the topic via Twitter or email! Generics. We all want them, they are probab…