ansiToHtml() public static method
Converts an ANSI formatted string to HTML
Note: xTerm 256 bit colors are currently not supported.
public static string ansiToHtml ( $string, $styleMap = [] ) | ||
---|---|---|
$string | string |
The string to convert. |
$styleMap | array |
An optional mapping of ANSI control codes such as FG_COLOR or BOLD to a set of css style definitions. The CSS style definitions are represented as an array where the array keys correspond to the css style attribute names and the values are the css values. values may be arrays that will be merged and imploded with |
return | string |
HTML representation of the ANSI formatted string |
Please login to continue.