- ChromeLogger をインストール
- ChromePhp.php ダウンロードして PHP include パスのどこかに入れる
$ wget https://raw.githubusercontent.com/ccampbell/chromephp/master/ChromePhp.php
$ php -r 'echo get_include_path();'
変数を出力したい場所で Chromephp クラスの log メソッドを呼び出す。
<?php
include 'ChromePhp.php';
ChromePhp::log('Hello console!');
ChromePhp::log($_SERVER);
Devel モジュールが提供する ChromePhp::log のラッパ dcp() を使うと便利。
<?php
dcp('You are seeing what you must not see...');