Skip to content
An interactive php shell (REPL) with support for readline, autocomplete, include/require, and fatal-error tolerance.
PHP
Find file
Latest commit 45d968d @apinstein Update fakeReadline() to use libedit::readline() on pre 5.4 versions …
…of php. Mitigates bug in libedit/readline.


https://answers.launchpad.net/ius/+question/198150

php53u version of php includes libedit but not readline and due to above
bug, various readline functions were not mapped thru properly.

This patch at least gives reasonable readline functionality on 5.3
versions since the above bug was fixed only in 5.4.0.

README.markdown

iphp - Interactive PHP Shell

iphp is an interactive php shell that solves a number of painful problems with normal php shells:

  • Fatal Error handling - iphp doesn't die even if your code does.
  • optional readline support
  • readline support includes: autocomplete, history, line editing
  • support ctags tags files
  • implemented as a class for integration with your framework
  • support for require/include; you can load php files within iphp
  • extensible command system

INSTALLATION

pear install apinstein.pearfarm.org/iphp

EXAMPLE

php> new ArrayObject(array(1,2))

=> ArrayObject Object
(
    [0] => 1
    [1] => 2
)

php> $_[0] + 1
=> 2

php> \help 
alias(es)                     <help>
-------------------------------------------------------
exit,die,bye,quit             Quit the shell.
reload                        Re-initialize the iphp state so it's just as if you quit and re-started.
help,?                        View a list of all installed commands.
Something went wrong with that request. Please try again.