首页 > 编程开发 > PHP    日期:2021-07-01 / 来自互联网 / 浏览

官方网址

https://psysh.org/

Github地址

https://github.com/bobthecow/...

安装

使用wget安装

$ wget https://git.io/psysh
$ chmod +x psysh
$ ./psysh

使用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%;" />

觉得上面的内容有用吗?快来点个赞吧!

点赞() 我要打赏

温馨提示 : 本站内容来自会员投稿以及互联网,所有源码及教程均为作者总结编辑,请大家在使用过程中提前做好备份,以免发生无法预知的错误,源码类教程请勿直接用于生产环境!

 可能感兴趣的文章