PHP
[ class tree: PHP ] [ index: PHP ] [ all elements ]

File: Shell.php

Source Location: /PHP_Shell-0.3.0/PHP/Shell.php

Classes:

PHP_Shell

Page Details:

A interactive PHP Shell

The more I work with other languages like python and ruby I like their way how they work on problems. While PHP is very forgiving on errors, it is weak on the debugging side. It was missing a simple to use interactive shell for years. Python and Ruby have their ipython and iruby shell which give you a direct way to interact with the objects. No need to write a script and execute it afterwards.

Starting the Shell:

The package contains a shell wrapper for windows and unix:

 sh>  php-shell.sh
 win> php-shell

Both are calling the wrapper script

  1. php -q php-shell-cmd.php

Inline Help

 PHP-Shell - Version 0.2.0, with readline() support
 (c) 2006, Jan Kneschke 

 >> use '?' to open the inline help

 >> ?
 "inline help for the PHP-shell

   >> ?
     print this help
   >> ? 
     get the doccomment for a class, method, property or function
   >> p 
     execute a verbose print (if implemented)
   >> quit
     leave shell
 "
 >> ? PHP_Shell
Alternatives

  • http://david.acz.org/phpa/
  • http://www.hping.org/phpinteractive/
  • the embedded interactive php-shell: $ php -a

Includes:

require_once("PHP/Shell/Options.php") [line 92]
require_once("PHP/Shell/Commands.php") [line 91]
PHP_Shell

a interactive PHP Shell with tab-completion and history it can catch FATAL errors before executing the code

Extensions are provided through three side-classes:

  • PHP_Shell_Commands
  • PHP_Shell_Options
  • PHP_Shell_Extensions


__shell_readline_complete [line 857]

array __shell_readline_complete( string $str, integer $pos)

a readline completion callback
  • Return: list of possible matches


Parameters

string   $str   linebuffer
integer   $pos   position in linebuffer
[ Top ]



Documentation generated on Mon, 11 Mar 2019 14:40:35 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.