test hook written in PHP