Enhance Cvardumper Logic To Detect Running Form Console

I use the CVarDumper in some components that will be used both from webapp and from consoleapp

In webapp i’d like to see colored dump, so I used to set ‘true’ the third option of dump() method.

In consoleapp, it show a useless list of html tag to color the text.

Is it possible to enhance CVarDumper so, if PHP_SAPI == ‘cli’, the ‘true’ option is automagically ignored !?!?