array_chunk in PHP
Explains the PHP array_chunk function, demonstrating how to split arrays into segments and use it for statistical calculations like weekly averages.
Brent — Curator of Stitcher’s Community Feed, a community-driven, hand-curated content aggregator highlighting thoughtful, high-quality writing from across the web. The feed focuses on software engineering, open source, web development, infrastructure, and the human side of building technology. Readers can browse recent picks, follow via RSS, or contribute their own suggestions.
239 articles from this blog
Explains the PHP array_chunk function, demonstrating how to split arrays into segments and use it for statistical calculations like weekly averages.
Explores combining event sourcing with stateful systems for a large-scale project, focusing on design for reporting and historical tracking.
A developer's analysis of how a minor version update in a Composer dependency caused a breaking change in a Laravel project, highlighting versioning pitfalls.
Explores an experimental event-driven PHP server architecture using in-memory state and event sourcing, with insights from a proof-of-concept.
Explains how to use bitwise operators and binary masks to store boolean flags efficiently in PHP, with practical examples.
A guide to implementing enum-like behavior in PHP before PHP 8.1, using polymorphism for type safety and value-specific logic.
A look at modern PHP's evolution, debunking common misconceptions and highlighting its improved type system and development practices in 2020.
Benchmarking the performance impact of PHP 7.4's preloading feature on a real Laravel application, comparing different preloading strategies.
A technical guide for upgrading to PHP 7.4 on macOS using Homebrew, including steps for Laravel Valet and managing extensions.
Overview of new features in PHP 7.4, including arrow functions, typed properties, preloading, and the null coalescing assignment operator.
A Laravel developer explains solving a complex database performance issue by creating a custom Eloquent relation to efficiently load nested model data.
A concise guide to using Laravel's HasManyThrough relationship with a practical database schema and code example.
A developer's response to the PHP team about internal governance, RFC processes, and the need for modernized rules to improve language evolution.
A userland developer's open letter to the PHP team discussing RFC voting, backwards compatibility, and the language's development process.
Clarifies misconceptions about dependency injection, explaining what it is not: service location, shared dependencies, or auto-wiring.
Explains PHP 7.4's preloading feature, which improves performance by loading compiled code into memory on server startup.
An in-depth look at typed class properties, a major type system improvement introduced in PHP 7.4, covering syntax, initialization, and usage.
Explores how type systems in programming can reduce the need for extensive testing by ensuring correct data input, using a color conversion function as an example.
A podcast episode exploring the original definition of Object-Oriented Programming and comparing it to modern interpretations.
A developer shares statistics and insights from a year-long Laravel web application project, detailing code structure, frameworks, and testing strategies.