zzengineer/eprint
最新稳定版本:0.9
Composer 安装命令:
composer require zzengineer/eprint
包简介
Kernighan style eprint utility functions for php
README 文档
README
Kernighan style eprint utility functions for php
NAME
eprint -- formatted stderr printing utility functions
SYNOPSIS
function eprint($msg)
function nprint($msg)
function wprint($msg)
DESCRIPTION
All functions will print a message to STDERR prepended with date, filename, pid and the level depending on the function used. The eprint() function will additionaly halt the execution with exit(2). If $msg is passed as a multiline string, it will be indented to emphasize it's multiline nature.
EXAMPLES
the following code
nprint('this is a notice'); nprint('this is a dump of the $_ENV '. print_r($_ENV, true)); wprint('this should be checked sometime'); eprint('and this will stop the execution');
will output
2015-09-21 19:35:55 printme [81662] notice: this is a notice
2015-09-21 19:35:55 printme [81662] notice: this is a dump of the $_ENV Array
(
[PAGER] => more
[EDITOR] => vi
[...]
[SHELL] => /bin/sh
[BLOCKSIZE] => K
)
2015-09-21 19:35:55 printme [81662] warning: this should be checked sometime
2015-09-21 19:35:55 printme [81662] error: and this will stop the execution
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-21