Trie – prefix tree, autocomplete, spam filter, benchmark vs array
A Trie (prefix tree) is a data structure that stores strings in a tree where each node represents a character. It is the foundation of autocomplete, spell-check, and IP routing. PHP arrays can implement the same functionality but at very different performance characteristics. I implement a Trie from scratch and benchmark it against array-based approaches.
- Published in Algorytmy
AI tools for the PHP developer – Copilot, Claude, Ollama, where it helps and where it fails
AI coding assistants moved from novelty to daily tool in the span of a year. After using GitHub Copilot, Claude, and local models via Ollama for several months across PHP and Magento projects, I have a clear picture of where they genuinely save time and where they confidently generate plausible-looking wrong code. This is an honest assessment, not a marketing piece.
- Published in PHP
REST API security – tokens, ACL, nginx rate limiting, monitoring suspicious requests
Magento 2 REST API is powerful but exposed to abuse if not properly secured. Default token authentication, over-permissive ACL resources, no rate limiting, and logging gaps are the most common issues I see on production installations. I show a layered security approach: proper token management, granular ACL, nginx rate limiting, and monitoring for suspicious patterns.
- Published in Magento / Adobe Commerce
ReactPHP – event loop, parallel HTTP requests, HTTP server, Fibers bridge
ReactPHP is a library for event-driven, non-blocking I/O in PHP. It brings the same model that made Node.js famous to the PHP world – a single-threaded event loop that handles multiple concurrent connections without threads. I show how to build a simple HTTP server, make parallel HTTP requests, and bridge between ReactPHP’s promise-based async and PHP 8.1’s Fibers.
- Published in PHP
