Interactive Shell class in PHP