I cannot find solution and explanation of this problem. I have this simple program for NodeJS:
var colored = ' \u001b[1;41mFAILED\u001b[0m';
console.log(colored);
And on Win8 it prints colored output into the CMD. But... If I write very similar program in PHP:
$color = "[1;41mFAILED\x1b[0m";
print chr(27) . $color;
It doesn't work. The output is ←[1;41mFAILED←[0m
. But why? Why it works only with NodeJS? Where is the difference? And how can I print colored output in PHP? It's obvious that it's possible if NodeJS can do this without additional programs needed. Thanks...