PHPnews.io

Overview for 'stitcher-io'

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…


What's new in PHP 8.1

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

PHP 8.1 will be released on November 25, 2021. We already know all new features, performance improvements, changes and deprecations; so let's go through them one by one. 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…


The case for route attributes

Written by Stitcher.io / Original link on Oct. 27, 2021

I've been thinking about route attributes lately. By doing so, I came to realise that I've got a somewhat strange relation with annotations a.k.a. attributes. Over the years, I've gone from loving them to hating them, to loving them again, to somewhere in between. I've seen them abused, both inside…