A REPL for PHP

Comments
  • Cannot use `require` or similar in shell, PHP 7.3.5

    Cannot use `require` or similar in shell, PHP 7.3.5

    PHP: 7.3.5 PSYSH: 0.11.9, 0.11.10

    Sometimes I manually include or require to test something. This used to work, but as of 0.11.9 (maybe earlier) and 0.11.10 when I run the command $a = require_once 'file.php'; $a is left unset, and the code is not included in the shell. No error is thrown, seemingly nothing occurs. Using sudo also does not seem to work.

    The command is also not included in the command history.

    This affects require, require_once, include, and include_once.

    I am initializing a base code behind it using a configuration function, and that does include Composer.

    I didn't see anything in the notes about this in the release notes or Wiki, and it seems strange that I can no longer do so.

    I am currently using an older version of PHP, 7.3.5, but I do not see support for that discontinued yet.

    This has worked fine in previous versions of PSYSH so it not working now came as a bit of a surprise! Let me know if this is a known issue, or related to my own setup, or a PHP 7 issue.

    opened by ooglek 5
  • Wiki Update: Install psysh through homebrew

    Wiki Update: Install psysh through homebrew

    Hi,

    yesterday, I created a PR to the homebrew project that makes it possible to install psysh via brew.

    Homebrew is a third party Mac package manager and is probably the most used one in the Mac world. For more information on how to install and use Homebrew see their homepage.

    My pull pequest: https://github.com/Homebrew/homebrew-core/pull/118589 Details about the PsySH formula: https://formulae.brew.sh/formula/psysh

    I wanted to add the installation method to your wiki too but found out that there's no option to add pull requests for wiki pages on Github.

    In case you don't want to maintain the newest version in brew by yourself, you might want to add the brew installation as "unofficial" or "not supported". I'm happy to contribute here though, just let me know what I can do.

    opened by sbani 0
  • Make an official Docker image

    Make an official Docker image

    An official PsySH Docker image would be very useful to test PHP features/libraries/projects in an isolated environment.

    Minimal specs could be:

    • PHP v8.1.x
    • Composer

    Assembled with this kind of Dockerfile:

    FROM php:8.1.11
    
    ARG PSYSH_VERSION
    
    RUN \
        && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
        && curl -L https://github.com/bobthecow/psysh/releases/download/$PSYSH_VERSION/psysh-$PSYSH_VERSION.tar.gz -o /tmp/psysh.tar.gz \
        && tar -xzvf /tmp/psysh.tar.gz -C /tmp \
        && chmod 755 /tmp/psysh \
        && mv /tmp/psysh /usr/local/bin
    
    CMD ["/usr/local/bin/psysh"]
    
    opened by mtovmassian 1
  • Activate auto-completion for non-GNU Readlines

    Activate auto-completion for non-GNU Readlines

    The current AutoCompleter enables readline_completion_function() directly, but this completion mechanism can be provided in addition to the native readline() function. So is the UserlandReadline, which is based on Hoa, for example.

    deleted

    The current AutoCompleter enables readline_completion_function() directly, but this completion mechanism can be provided in addition to the native readline() function. So is the UserlandReadline, which is based on Hoa, for example.

    The nodejs-repl.el suggested by @takeokunn seems to do exactly that.

    opened by zonuexe 2
  • what would it take to utilize prompt-toolkit (or replicate its features)?

    what would it take to utilize prompt-toolkit (or replicate its features)?

    opened by ahillio 5
Releases(v0.11.10)
Owner
Justin Hileman
Justin Hileman
PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal.

PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal. ??

Nuno Maduro 32 Dec 26, 2022
PHP Reverse Shell > reverse-shell.php

PHP Reverse Shell > reverse-shell.php PHP Cmd Shell > cmd.php JPG cmd Shell > cmd.jpg /etc/passwd Pulling Shell > etc-passwd.php Configuration Pulling

Dark-Network 5 Feb 24, 2022
Web Shell Detector – is a php script that helps you find and identify php/cgi(perl)/asp/aspx shells.

Web Shell Detector – is a php script that helps you find and identify php/cgi(perl)/asp/aspx shells. Web Shell Detector has a “web shells” signature database that helps to identify “web shell” up to 99%. By using the latest javascript and css technologies, web shell detector has a light weight and friendly interface.

Maxim 763 Dec 27, 2022
CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due

PHP Cron Expression Parser NOTE This fork has been deprecated and development moved to https://github.com/dragonmantank/cron-expression. More informat

Michael Dowling 4.9k Jan 5, 2023
🖥 Build beautiful PHP CLI menus. Simple yet Powerful. Expressive DSL.

Contents Minimum Requirements Installation Upgrading Usage Quick Setup Examples API Appearance Menu Title Colour Width Padding Margin Borders Exit But

PHP School 1.9k Dec 28, 2022
PHP's best friend for the terminal.

Running PHP from the command line? CLImate is your new best bud. CLImate allows you to easily output colored text, special formats, and more. Installa

The League of Extraordinary Packages 1.8k Dec 30, 2022
An Elegant CLI Library for PHP

Commando An Elegant PHP CLI Library Commando is a PHP command line interface library that beautifies and simplifies writing PHP scripts intended for c

Nate Good 793 Dec 25, 2022
Lovely PHP wrapper for using the command-line

ShellWrap What is it? It's a beautiful way to use powerful Linux/Unix tools in PHP. Easily and logically pipe commands together, capture errors as PHP

James Hall 745 Dec 30, 2022
Cilex a lightweight framework for creating PHP CLI scripts inspired by Silex

Cilex, a simple Command Line Interface framework Cilex is a simple command line application framework to develop simple tools based on Symfony2 compon

null 624 Dec 6, 2022
A powerful command line application framework for PHP. It's an extensible, flexible component, You can build your command-based application in seconds!

CLIFramework CLIFramework is a command-line application framework, for building flexiable, simple command-line applications. Commands and Subcommands

Yo-An Lin 428 Dec 13, 2022
[ABANDONED] PHP library for executing commands on multiple remote machines, via SSH

#Shunt Inspired by Ruby's Capistrano, Shunt is PHP library for executing commands on multiple remote machines, via SSH. Specifically, this library was

The League of Extraordinary Packages 436 Feb 20, 2022
A PHP library for command-line argument processing

GetOpt.PHP GetOpt.PHP is a library for command-line argument processing. It supports PHP version 5.4 and above. Releases For an overview of the releas

null 324 Dec 8, 2022
An object-oriented option parser library for PHP, which supports type constraints, flag, multiple flag, multiple values, required value checking

GetOptionKit Code Quality Versions & Stats A powerful option parser toolkit for PHP, supporting type constraints, flag, multiple flag, multiple values

Yo-An Lin 140 Sep 28, 2022
PHP Version Manager for the CLI on Windows

This package has a much more niche use case than nvm does. When developing on Windows and using the integrated terminal, it's quite difficult to get those terminals to actually listen to PATH changes.

Harry Bayliss 49 Dec 19, 2022
PHP CLI tool which allows publishing zipped MODX extra to modstore.pro marketplace

MODX Extra Publisher PHP CLI tool which allows publishing zipped MODX extra to modstore.pro marketplace. Installation global? local? To install packag

Ivan Klimchuk 3 Aug 6, 2021
Patrol is an elegant command-line tool that keeps your PHP Project's dependencies in check.

Patrol is an elegant command-line tool that keeps your PHP Project's dependencies in check. Installation / Usage Requires PHP 8.0+ First, install Patr

Nuno Maduro 237 Nov 14, 2022
Twitter raffles in the command line, with PHP and minicli

Rafflebird Rafflebird is a highly experimental CLI application for giveaways / raffles on Twitter, built in PHP with Minicli. Disclaimer: The recent s

Erika Heidi 33 Nov 16, 2022
A PHP command line tool used to install shlink

Shlink installer A PHP command line tool used to install shlink. Installation Install this tool using composer.

null 8 Nov 3, 2022