通过PHPCLI脚本运行behat会转义颜色代码

通过PHPCLI脚本运行behat会转义颜色代码,php,powershell,behat,ansi-colors,ansicon,Php,Powershell,Behat,Ansi Colors,Ansicon,当我直接从Windows PowerShell运行Behat测试时,输出的格式为颜色: 但是当我使用命令php runbehat.php运行下面的php脚本runbehat.php: <?php echo system(__DIR__.'/bin/behat --profile local'); 添加--colors选项 从使用-h可以显示的behat帮助中: --colors Force ANSI color in the output. By default color supp

当我直接从Windows PowerShell运行Behat测试时,输出的格式为颜色:

但是当我使用命令
php runbehat.php
运行下面的php脚本
runbehat.php

<?php
echo system(__DIR__.'/bin/behat --profile local');
添加
--colors
选项

从使用
-h
可以显示的behat帮助中:

--colors  Force ANSI color in the output. By default color support is
          guessed based on your platform and the output if not specified.