
php tek 2025 Day One Notes
Scott Keck-Warren • May 20, 2025
One of the things I'm trying to do better about is to document my notes when I go to conferences so I refer back to them. This post contains day ones important information from php tek 2025.
Let Go of Ownership
In this keynote Tim Lytle discussed how we don't really own anything. I've seen it a couple of times and it's always thought provoking.
Processing One Billion Rows in PHP
In this talk Florian Engelhardt discussed the 1 billion row challenge:
The One Billion Row Challenge (1BRC) is a fun exploration of how far modern Java can be pushed for aggregating one billion rows from a text file. Grab all your (virtual) threads, reach out to SIMD, optimize your GC, or pull any other trick, and create the fastest implementation for solving this task!
from https://github.com/gunnarmorling/1brc
He talked about his attempt to do it using PHP and walked us through some of his optimizations from a "nieve" solution that took 23+ minutes all the way to something that took less than 30 seconds.
General take aways from my perspective were that the major problem turns out that converting string to numbers is the bottleneck in this process for PHP.
He also mentioned how when you have repeated calls to an associative array:
$array["value"][0] = "thing";
$array["value"][1] = 12;
There's a peniltiy to using the "value" key because of how PHP stores an associative array using a hash map so the hash has to be calculated multiple times (another string to int conversion).
This is better:
$subarray = $array["value"];
$subarray[0] = "thing";
$subarray[1] = 12;
Intro to Automated Refactoring with RectorPHP
In this talk Chris Abbey gave a nice intro to using RectorPHP. I have heard most of it but the part that finally "clicked" for me in this talk was the fact that what we should be using this tool to not just remove deprecated features and upgrade to new features in PHP releases but to use it to refactor changes because the true power is that we can do mass updates not just at a point in time like with PHPStorm but for all branches and then validate that in our CI/CD pipeline.
My raw notes:
Rector: A tool for the automated transformation of source code via configurable rules
- Install
- Current reposisitory => use in single project
- separate reposistory => share accross projects as part of your CLI
- Can be used to "downgrade to upgrade"
- withComposerBased -> can update phpunit
- Can specify different rector configs for whatever
- https://github.com/nikic/PHP-Parser
- Rules
- Can use to automatically refactor
- caveat emptor
SQL Database Design For Developers
Directly after lunch I gave my presentation on "SQL Database Design For Developers". There was decent turnout with around 30 people.
Mastering automated refactoring with custom Rector rules
I went to a tutorial by Dave Liddament that showed us how to write our own custom Rector rules. It was very hands on so I didn't take many notes but I'm planning on doing some videos that might help people understand this a little better.
The big part is that it's painfully easily to write custom rules to do cleanup and refactoring once you get over a LARGE initial set of learning about Abstract syntax trees and how PHP-Parser generates them.