Programster's Blog
Tutorials focusing on Linux, programming, and open-source
Add Satis Registry To A Project
Learn how to add your private Satis registry to your PHP project, in order to access your private PHP packages.
Simple Protocol Buffers (Protobuf) PHP Example
A tutorial for help getting started and demonstrating an incredibly simple use of protocol buffers in PHP.
PHP FPM Settings/Configuration Order
A diagram showing how the configuration and settings files override each other in PHP FPM, which may answer your question about why your setting/config file may not be having any effect.
PHP HTML Tidier Middleware
A tutorial providing a PSR-15 compatible middleware that will tidy your HTML response.
Composer - Please Don't Use --ignore-platform-reqs Flag
A dmonstration video of why I believe you should not use the `--ignore-platform-reqs` composer command flag.
Performance benchmark of PHP runtimes From Dzmitry Kazbiarovich
Sharing a performance benchmark article written by Dzmitry Kazbiarovich on PHP runtimes.
Upgrading Ubuntu 22 LAMP Docker Image to HTTP/2
Learn how to configure Apache with PHP to allow HTTP/2 connections.
Extending Rundeck Image With PHP
Learn how to extend the Rundeck image in order to be able to support local PHP scripts.
Laravel - Turn Exceptions Into API Responses
Learn how to get Laravel to turn exceptions into legitmate API responses, rather than having to catch them and convert them manually each time.
Laravel Eloquent Relationships
Learn how to define the relationships between models for Eloquent queries in Laravel.
PHPSpreadsheet - Read Excel (.xlsx) File To Array
Read a basic Excel .xlsx spreadsheet into an array as if it was a CSV file.
Create Excel (Xslx) Spreadsheets Using PHPSpreadsheet
Learn to use PhpSpreadsheet in order to create Excel (xlsx) files.
Laravel Cheatsheet - Models, Factories, and Database Queries
A cheatsheet for Laravel covering the topics of models, factories, and database queries.
Laravel - Use UUID For Model ID
This tutorial will show you how you can quickly add a UUID trait, which you can then add to your models, so that they are using a UUID for their primary key/identifier.
A Really Basic Swoole Threading Example
A really basic multithreading example when using Swoole PHP.
Getting Started With Laravel Queues and Background Jobs
Learn how to make use of Laravel queues to schedule background (asynchronous) jobs.
Setting Up TOTP in PHP
Get started with using time-based one-time-passwords (TOTP) in PHP for MFA/2FA.
PHP - Working With Large JSON Files
A tutorial on how you can work with extremely large JSON files in PHP
PHP - Fetch Latest Tweets of Specific User
Fetch the latest tweets of a specific user, through the use of the Twitter API.
Composer Install From Private Repository In a Privately Hosted GitLab Server Using GitLab Tokens
Learn how to install packages hosted on a private Gitlab server using Composer and GitLab tokens. This is primarily useful for those setting up CI/CD pipelines with private PHP packages.
Laravel - Throw Exception If Environment Variable Not Set
Implement a defensive step in your Laravel framework by throwing an exception if an expected environment variable is not set, rather than reverting back to some default that is probably not appropriate.
Composer - Specify Configuration Environment
Specify the environment in the config section of composer, allowing you to dev for a different environment.
KVM - Automated Snapshot Pruning Script
A script to automatically prune old snapshots and only keep the last X number.
Creating Github Webhook For Packagist
Learn how to set up a webhook in Github in order to automatically update the package in Packagist.
Ubuntu 18.04 - Deploy Your Own Satis Server
Steps on setting up your own satis server on ubuntu 18.04
Ubuntu 16.04 - Deploy Your Own Satis Server
Steps on setting up your own satis server on ubuntu 16.04
Netbeans - Adding Support for Laravel
Add support for Laravel in Netbeans so that you can get auto-completion and hints working.
PHP Error and Exception Handling
Learn how to register some handlers so that we can capture any kind of issue that occurs in our PHP application.
PHP - Strict Types
Learn about using declare(strinct_types = 1); in PHP and the implications it has.
Sending Metrics To Statsd With PHP
Start firing data off to your Graphite server's statsd collector in order to start tracking/monitoring events.
Getting Started With PHP CodeSniffer
Get started with using the codesniffer tool in order to ensure your code adheres to the PSR-2 standards.
Ubuntu 16.04 - Install PHP 7.2 From PPA
Install a later version of PHP on Ubuntu 16.04 by using a PPA from Ondrej.
Slim3 - Simplifying Routing At Scale
A video-tutorial demonstrating how you can move a lot of the routing registration in Slim3, into the controllers, thus simplifying your codebase if you have a lot of routes.
PHP - Using UUID Instead of Auto Increment or Sequence
Learn how to use UUIDs in MySQL for your table IDs, rather than using auto_increment.
PHP Lecture - Identify All the Things With UUIDs!
A lightning talk on UUIDs from the maintainer of the ramsey/UUID package library for PHP.
PHP - Doctrine ORM Good Practices and Tricks
A talk made by Macro Pivetta on "Doctrice ORM Good Practices and Tricks".
PHP Packages - Requiring Self For Testing
Learn how to include your package within itself for testing and not have to keep pushing the code and composer updating.
PHP Multithreading - Thread Pool Example
An example of using a thread pool for handling threads more efficiently.
Getting Started With Selenium Testing using PHP
Get started with using Selenium for automating tests, and writing those tests in PHP.
Set up Latest Dev PHP with Multithreading on Ubuntu 16.04
This tutorial will show you how to recompile PHP with ZTS enabled, before then adding the pthreads extension in order for us to be able to easily write multithreaded PHP CLI scripts.
Install PHP 7.0 With Pthreads on Ubuntu 16.04
Install PHP 7.0 With Pthreads for multithreading on Ubuntu 16.04
Set Up PHP With Multithreading on Ubuntu 16.04
This tutorial will show you how to recompile PHP with ZTS enabled, before then adding the pthreads extension in order for us to be able to easily write multithreaded PHP CLI scripts.
PHP - The Importance of Actually Implementing The Interface
An example of why you need to use the implements keyword on a class to implement an interface, and not just implement its methods.
Extremely Defensive PHP
A fantastic timestamped lecture on defensive PHP. Everyone should watch this!