PHP code example of zonuexe / psysh-hoa-console
1. Go to this page and download the library: Download zonuexe/psysh-hoa-console library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zonuexe / psysh-hoa-console example snippets
use Psy\Readline\GNUReadline;
use Psy\Readline\Libedit;
use zonuexe\Psy\Readline\HoaConsoleAdapter;
$is_dumb = !isset($_ENV['TERM']) || ($_ENV['TERM'] === 'dumb');
$config = new \Psy\Configuration;
if (!$is_dump && !GNUReadline::isSupported() && !Libedit::isSupported()) {
$config->setReadline(new HoaConsoleAdapter);
}
$sh = new \Psy\Shell($config);
$sh->run();