Browser/javascript like console class for PHP