runkit – changing the PHP internals on the fly

Here is something I didn’t know about until today – PHP’s runkit extension:

The runkit extension provides means to modify constants, user-defined functions, and user-defined classes. It also provides for custom superglobal variables and embeddable sub-interpreters via sandboxing.

This blog post – “Shimming PHP for Fun and Profit” – demonstrates how to use it with a case for a custom base64_decode() and unserialize() functions.  Here is the actual code on GitHub, which shows off how to use runkit_function_rename() and runkit_function_add().

This is not something one would use frequently, but might be an absolute life saver on a rainy day.

Deployer — Deployment tool for PHP

deployer

Deployer is yet another tool for deploying PHP projects.   It looks to have more similarities with Laravel Envoy and phake, than with Robo.li, of which I am a new and growing fan.  But I thought I’d throw it into the mix here, just in case I’ll change my mind in the future.

Top 29 books on Amazon from Hacker News comments

hacker-news-books

I came across this nice visualization of “Top 29 books ranked by unique users linking to Amazon in Hacker News comments“.

Amazon product links were extracted and counted from 8.3M comments posted on Hacker News from Oct 2006 to Oct 2015.

Most of these are, not surprisingly, on programming and design.  A few are on startups and business.  Some are on how to have a good life.  Which is a bit weird.