Tag: PHP

Automating Redis cluster setup

Introduction This post serves as a companion to my repository, which provides an automated setup script for deploying a Redis cluster. Designed to streamline the process of configuring a clustered environment, the script enables users to quickly establish a functional Redis cluster with minimal manual intervention. In this guide, I’ll explain the purpose behind this […]

Coding challenge – HTML web server in PHP

I wanted to learn a bit more about concurrency and network programming, so I built two TCP socket servers in PHP as a coding challenge. It’s a practical way to practice and get a grip on managing multiple connections at once. I’m not going for anything complex—just experimenting and picking up the basics step by […]

Setting custom PHP code sniffing rules

Code sniffing is the practice of checking the code for compliance with some pre-determined standards. It’s very important to run your code through a sniffer because it helps with maintenance and ensures better code quality. The most common standards in PHP are PSR-0, PSR-1, PSR2 and PEAR. These rules might specify details such as depth […]

Finding out PHP server interface

There are many ways of executing a PHP script. For example you might run it directly from a command line: Other option, readily available for tesing since PHP 5.4, is to spin up the internal PHP server and see the result in a browser: If you create a simple page with the function php_sapi_name you […]