shyim / php-dump-client
v0.0.8
2021-12-16 14:22 UTC
Requires
- php: >=7.2
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- doctrine/sql-formatter: ^1.1
- symfony/var-dumper: 5.4.*
Requires (Dev)
README
这是一个华丽的Symfony Var-Dump服务器。该存储库包含用于将信息发送到UI服务器的PHP客户端的代码。
该项目目前正在开发中
安装
composer req shyim/php-dump-client
或前缀(不需要其他依赖项)
composer req shyim/php-dump-client-prefixed
或全局可用的auto_prepend_file
- 将
shyim/php-dump-client-prefixed
克隆到某个位置 - 配置
auto_prepend_file=PREFIXED_FOLDER/prepend.php
使用方法
- 首先启动 调试服务器
- 可选:如果dump服务器不在本地运行,请将环境变量
PHP_DUMP_SERVER_URL
设置为Dump服务器 - 使用您喜欢的
pd()
命令
// Sends variables to the UI Server to show pd()->log($var1, $var2); // Sends the trace to the UI pd()->trace(); // Clears the ui window pd()->clear(); // Stops the process until its unlocked in the UI pd()->pause(); // Show execution time of function and memory usage pd()->time('Label', function() { sleep(1); }); // Show execution time of function and memory usage $timer = pd()->time('Label'); // Do something $timer->stop(); // Allows tagging of calls in the UI pd()->tag('My-Tag')->Method($args);