Skip to content

Commit a09f00f

Browse files
committed
fix: fix demo.php
Signed-off-by: Jack Cherng <jfcherng@gmail.com>
1 parent 8384498 commit a09f00f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

demo.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
include __DIR__ . '/vendor/autoload.php';
44

55
// colors in a string using a comma as the delimiter
6-
echo str_color('foo', 'f_light_cyan, b_yellow'); // "\033[1;36;43mfoo\033[0m"
6+
echo str_cli_color('foo', 'f_light_cyan, b_yellow'); // "\033[1;36;43mfoo\033[0m"
77

88
echo \PHP_EOL;
99

1010
// colors in an array
11-
echo str_color('foo', ['f_white', 'b_magenta']); // "\033[1;37;45mfoo\033[0m"
11+
echo str_cli_color('foo', ['f_white', 'b_magenta']); // "\033[1;37;45mfoo\033[0m"
1212

1313
echo \PHP_EOL;
1414

1515
// do not auto reset color at the end of string
16-
echo str_color('foo', ['f_red', 'b_green', 'b', 'blk'], false); // "\033[31;42;1;5mfoo"
16+
echo str_cli_color('foo', ['f_red', 'b_green', 'b', 'blk'], false); // "\033[31;42;1;5mfoo"
1717

1818
// manually add color reset
19-
echo str_color('', 'reset'); // "\033[0m"
19+
echo str_cli_color('', 'reset'); // "\033[0m"
2020

2121
echo \PHP_EOL;
2222

2323
// remove all color codes from a string
24-
echo str_nocolor("\033[31;42;5mfoo\033[0mbar"); // "foobar"
24+
echo str_cli_nocolor("\033[31;42;5mfoo\033[0mbar"); // "foobar"
2525

2626
echo \PHP_EOL;

0 commit comments

Comments
 (0)