Generalized event-based API for PHP.