Tag: php

  • PHP Strict Types: Hard to get right

    Some people live and swear by strict types in PHP, and it’s understandable why they do. I want to start by saying that strict types have their purpose, but many programmers don’t understand what they mean and misuse them. I’ve seen plenty of subtle bugs related to strict types, so if you use strict types,…

  • On Writing a Streaming HTML5 Parser in PHP

    On Writing a Streaming HTML5 Parser in PHP

    One of my biggest complaints with the Swytch Framework is that it is using a validating HTML5 parser. This is great if you want to sanitize some HTML or validate HTML, but in the case of Swytch, this isn’t ideal. Now if you haven’t heard of the Swytch Framework, it’s essentially JSX for PHP. You…

  • Symfony/Doctrine’s Docs has caused more bugs than anything else.

    Symfony and Doctrine’s documentation has a slight flaw: they don’t use constructors for DTOs.

  • Creating an ORM-less framework

    Years ago, I enjoyed working with Durable Functions on Azure. There were some aspects that I fell in love with, like how “close” I felt to pure DDD, how simple it was to scale, and how little boilerplate was required. I just had one “problem”[1], I wanted to use it in PHP. I’ve been a…

  • Hello, Swytch Framework

    Hello everyone! Several years ago, I embarked on a journey to build an app in PHP 8. To have some fun along the way, I decided to throw out ‘established’ and ‘entrenched’ ideas in software development. So, I experimented and questioned everything. The original app still isn’t done. I’m not sure when, if ever, it…

  • Building the fastest PHP router ever

    Ok, so the title might be a little bit click-baity since I haven’t compared it to every router in existence. Just nikic’s Fast Route. On my sabbatical last summer, I was messing about with microservices (which I’m convinced are evil, but that is an article for another day). During that, I decided to create a…

  • Exploring the performance of FrankenPHP

    Exploring the performance of FrankenPHP

    Hi! This post is pretty old (like when FrankenPHP was alpha software) and needs to be redone! All the memory leaks have been squashed, and can do about 15k+ reqs per second and can completely saturate a network/cpu package, as of 1.0.3. The original post is below. If you live in the PHP world, you’ve…

  • Dissecting WordPress: Hooks: Filters and Actions

    Dissecting WordPress: Hooks: Filters and Actions

    Many people tend to take WordPress hooks for granted (or loathe them). Hooks are a powerful way to change the [ex# name=’behavior’]behavior of WordPress fairly drastically.[/ex#][ex#d name=’behavior’] Hooks are built into WordPress. Without hooks, you’d have to fork the original code and modify it to change it’s behavior. They allow you to literally hook into…

  • Serverless: From a PHP Developer’s Experience

    Serverless: From a PHP Developer’s Experience

    this is suicide for all hosting companies that currently host all websites. Suddenly, no one would need servers. PHP would be, quite literally, the easiest migration to serverless known to mankind.