FirePHP: log to firebug console

FirePHP enables you to log to your Firebug Console using a simple PHP method call. All data is sent via response headers and will not interfere with the content on your page. FirePHP is ideally suited for AJAX development where clean JSON and XML responses are required.

The way FirePHP works is very easy, all the information that you want to view at run time is coded in JSON and sent in the headers of the response. When these headers arrives to the navigator, FirePHP detect it and to render the information in the Firebug console.

As of version 1.6 Zend Framework has native support for FirePHP. There are two components that allow you to log data to Firebug. These are Zend_Log_Writer_Firebug and Zend_Db_Profiler_Firebug.


Leave a Reply