Bug #36954

Only use ansi colors for var_dump() if supported

Added by Bastian Waidelich over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Cli
Start date:
2012-05-08
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

\TYPO3\FLOW3\var_dump() currently uses ANSI codes to colorize variables on the CLI.
On Windows that's not supported by default and instead all special characters are outputted.
I don't know how to detect ansi support from PHP, so I would suggest to disable this on Windows for now.
The change is trivial:

$ansiColors = $plaintext;

$ansiColors = $plaintext && DIRECTORY_SEPARATOR === '/';

Also available in: Atom PDF