php[architect] logo

Want to check out an issue? Sign up to receive a special offer.

Parallelize Your Code

February 2022

There are a lot of things you can say about PHP and trust me a lot has been said about PHP, but the one thing you can not say is that it hasn’t proven itself. PHP has grown with the internet itself and has the battle scars to show for it.

How to Hack your Home with a Raspberry Pi – Part 2 – Installing the LAMP Stack on your Pi

By Ken Marks

Welcome back to another installment of ‘How to Hack your Home with a Raspberry Pi.’ At the end of this article, you should have a Raspberry Pi running a full LAMP stack that can serve up web pages to any browser on your home network. So grab your Raspberry Pi and a beverage of your choice so you can continue this journey with me as we install some more software! by Ken Marks

Teaching Through Code Review

By Derek Binkley

In March 2020, our world shut down. Our connections with colleagues were severed, and the ways we connect with others were changed and will possibly never return to our pre-pandemic norms. We have been overworked, stressed, lonely and afraid. In this environment, we need more than ever to find ways to build each other up and succeed as a team. That is why I propose taking our code review process and changing it from a point of conflict into an opportunity for learning. by Derek Binkley

Introduction to Diagram-as-Code

By Gabriel Zerbib

The documentation of source code and APIs have now moved to the source files side. There are tools that make it possible to extract the documentary blocks, to always keep the manual and the code in phase without duplicating the effort. However, a good drawing is better than a long speech, and it becomes more necessary than ever to practice Diagram as Code (DaC) to incorporate technical illustrations directly in the sources. by Gabriel Zerbib

PHP Puzzles: Finding Integer Factors

By Oscar Merida

This article looks at solutions for finding integer factors for a given integer. Another way to put this problem is to decompose an integer into a multiple of two smaller integers. Besides hearkening back to Algebra classes of yore, we’ll discuss applications of this technique. by Oscar Merida

Education Station: Async is a Lie

By Chris Tankersley

One of the more popular programming topics over the last few years has been the idea of “async programming.” Async programming is touted as a way to speed up applications by avoiding issues that normally stall a program. When an application hits an operation that prohibits anything else from happening, this is called a “blocking operation.” A blocking operation blocks all other execution until it finishes. by Chris Tankersley

The Workshop: Configuring PHP-FPM & Apache

By Joe Ferguson

Last month we covered PHP and Apache and demonstrated how to get started with our custom virtual host in Apache and execute PHP via the libapache2-mod-php (mod-php) library. This month we will replace our use of mod-php with the Fast CGI Process Manager (FPM). Instead of bundling a PHP worker process in Apache, we’ll use FPM as another running service that will execute PHP. The requests are normally handled by Apache but instead of using mod-php, we’ll configure our virtual hosts to pass requests into the FPM service which will execute our PHP code and return the response to the Apache web server. One of the biggest benefits of using FPM with Apache is the ability to serve multiple PHP versions via the web server, which is not possible when using mod-php. by Joe Ferguson

DDD Alley: When You Know the Pattern

By Edward Barnard

Software design patterns provide a “voice of experience” that can help solve the problem you’re trying to solve. However, it’s often not obvious how to implement any such design pattern within our modern PHP ecosystem. Here’s an example solution. We are implementing a memoizing Registry that’s outside my CakePHP framework code but uses CakePHP’s database layer. In July 2020’s php[architect], I wrote a most excellent rant, “We Got Robbed.by Edward Barnard

Security Corner: Getting Started with Cybersecurity

By Eric Mann

Every career track starts somewhere. Cybersecurity doesn’t always begin where you’d expect. by Eric Mann

Community Corner: Interview with PHP 8.1 Release Manager Ben Ramsey

By Eric Van Johnson

Last month we talked with Patrick Allaert, the release manager for PHP 8.1, but Patrick is only one member of the dynamic duo known as the first-time release managers. The core team had been pairing one veteran release manager with one new release manager, but for PHP 8.1, they decided to have two new release managers. Although it may be Ben Ramsey’s first time being a release manager, he is not new to PHP Internals. As long as I’ve been lurking on the PHP Internal Mailing List, I’ve seen Ben contributing to the discussions and voting on RFCs. This month we learn a little more about Ben and his journey into the PHP coding life. by Eric Van Johnson

finally{}: Every Which Way But Loose

By Beth Tucker Long

I recently saw yet another discussion online about PHP’s infamous naming convention exceptions and needle/haystack rotations. All the typical vitriol was there from the PHP haters, but I was very happy to see several new programmers add to the conversation or ask for clarifications and receive very supportive and educational responses from the thread. PHP is nothing if not consistent in its status as a recipient of the internet’s hatred. However, I am forever proud of our community’s ability to ignore the hate and still welcome and encourage newcomers. by Beth Tucker Long

Leave a comment

Use the form below to leave a comment: