关于php:PHP代码psysh调试代码片段工具

1次阅读

共计 834 个字符,预计需要花费 3 分钟才能阅读完成。

官网网址

https://psysh.org/

Github 地址

https://github.com/bobthecow/…

装置

  1. 应用 wget 装置

    $ wget https://git.io/psysh
    $ chmod +x psysh
    $ ./psysh
  1. 应用 composer 装置

     $ composer g require psy/psysh:@stable
     $ psysh

Command

wtf 打印最近的谬误提醒

history 显示执行命令

clear 革除命令

doc 显示函数应用文档

dump 打印变量

ls 显示变量

show 显示函数 常量 类 办法

doc 命令应用的时候须要安装文件到本地

PsySH 的文档寄存在 ~/.local/share/psysh/。(windows 零碎寄存在 C:\Users\{用户名}\AppData\Roaming\PsySH\

$ cd ~/.local/share 
$ mkdir psysh
$ cd psydh
$ wget http://psysh.org/manual/zh/php_manual.sqlite

Configuration

Osx ~/.config/psysh/config.php (or C:\Users\{USER}\AppData\Roaming\PsySH\config.php on Windows).

<?php
return [
    'commands' => [new \Psy\Command\ParseCommand,],

    'defaultIncludes' => [__DIR__ . '/include/bootstrap.php', // 这里能够加载本人平时罕用的类库],

    'startupMessage' => sprintf('<info>%s</info>', shell_exec('uptime')),
];

<img src=’https://gitee.com/smallsha/upic/raw/master/uPic/ 下载 (2).png’ alt=’ 下载 (2)’ style=”zoom:50%;” />

正文完
 0