Tag — 23 posts
#php
All tagsA bash snippet that installs phpunit, phploc, phpmd, pdepend and the rest of the PHP QA toolchain in one go through Composer.
A PHP continuous test runner rewritten to depend only on inotifywait, replacing the earlier Ruby and Watchr version.
Parallelising PHP lint with xargs so the linting step stops dominating build time on a large project in Jenkins.
ReactPHP puts an event loop in a language whose entire ecosystem assumes there isn't one. A look at what works, what a single blocking call does to it, and the narrow set of jobs it is actually right for.
Bubble, insertion, merge and quicksort written out in PHP and timed against each other — and against sort(), which beats all of them by two orders of magnitude for a reason worth understanding.
Forking, detaching from the terminal, PID files and signal handling in PHP — plus an honest look at the one problem the language does not let you solve, and what to do about it.
Pingback-php, a small library I wrote for making Pingback 1.0 requests from PHP without the boilerplate.
PHP has two parallel error systems that do not talk to each other. Converting one into the other, and registering the three handlers that catch what is left, is what makes a failure debuggable instead of a blank page.
Colour, tables and progress in a PHP console tool — and the detail most scripts get wrong: knowing when nobody is watching, because your output has been redirected into a file.
Three ways a PHP script can take input — argv, getopt() and standard input — what each one gets wrong, and when to stop and reach for Symfony2's Console component instead.