romannowicki / mpr
1.0.0
2017-04-16 17:56 UTC
This package is not auto-updated.
Last update: 2019-02-20 18:25:40 UTC
README
我的 print_r - 调试函数
打印变量的可读信息
安装
通过 Composer
使用示例
打印变量并继续
mpr($variable);
打印变量并退出
mpr($variable, 1);
当提供第二个参数时,您将获取 mpr 被调用的文件信息
Who called me: mpr/test.php line 14
输出
对象
--MPR--Foo Object ( [name] => Foo [data:protected] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) )
数组
--MPR--Array ( [x] => Hello [y] => Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 ) [z] => stdClass Object ( [0] => a [1] => b [2] => c ) )
标量
--MPR--string(5) "Hello"