Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/likeneko/php_cli_color
php的cli下输出颜色
https://github.com/likeneko/php_cli_color
Last synced: 8 days ago
JSON representation
php的cli下输出颜色
- Host: GitHub
- URL: https://github.com/likeneko/php_cli_color
- Owner: LikeNeko
- Created: 2021-01-21T09:05:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-08T09:24:14.000Z (over 3 years ago)
- Last Synced: 2024-04-23T08:43:42.751Z (7 months ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
## Use
```
* Cli::info("this is a data");
* Cli::fail("this is a data");
* Cli::wins("this is a data");
* Cli::note("this is a data");
* Cli::warn("this is a data");* Log::info("this is a data");
* Log::fail("this is a data");
* Log::wins("this is a data");
* Log::note("this is a data");
* Log::warn("this is a data");* Log::fail(new A());
[fail][无上级方法] ⤵️
A::__set_state(array(
'b' => 1,
'c' => 2,
'd' => 3,
))
* Log::wins(['a,','b','d']);
array (
0 => 'a,',
1 => 'b',
2 => 'd',
)
``````
$a = '123';
function aa($a,$n){
\Neko\Cli\Log::info("this is a data");
}
class A{
public $b = 1;
protected $c = 2;
private $d = 3;/**
* @return int
*/
public function getB(): int
{
return $this->b;
}/**
* @param int $b
*/
public function setB(int $b): void
{
$this->b = $b;
}
}
\Neko\Cli\Log::fail(new A() );
\Neko\Cli\Log::wins(['a,','b','d']);
aa(1,2);输出:
[fail][无上级方法][line:28] ⤵️
A::__set_state(array(
'b' => 1,
'c' => 2,
'd' => 3,
))
[wins][无上级方法][line:29] ⤵️
array (
0 => 'a,',
1 => 'b',
2 => 'd',
)
[info][func:aa(1,2)][line:5] this is a data```