1 A interactive PHP Shell
2 =======================
4 The more I work with other languages like python and ruby I like their way how they
5 work on problems. While PHP is very forgiving on errors, it is weak on the debugging
6 side. It was missing a simple to use interactive shell for years. Python and Ruby have
7 their ipython and iruby shell which give you a direct way to interact with the objects.
8 No need to write a script and execute it afterwards.
14 Starting with PHP_Shell 0.2.1 starting the shell is done by calling the shell-wrappers:
22 Write your own wrapper
23 ----------------------
25 Sometimes you want to write your own shell where you provide your own defaults, colours and
29 error_reporting(E_ALL);
31 require "php-shell-cmd.php";
36 $ php -q php-shell.php
41 PHP-Shell - Version 0.2.0, with readline() support
42 (c) 2006, Jan Kneschke <jan@kneschke.de>
43 released under the terms of the PHP License 2.0
45 >> use '?' to open the inline help
48 "inline help for the PHP-shell
53 get the doccomment for a class, method, property or function
55 execute a verbose print (if implemented)
64 The shell supports colours to seperate Exceptions from normal output of your
65 functions. To enable the colours you can to set:
67 >> :set background=dark
69 By default the colour-schemes 'plain' (the default), 'light' and 'dark' are
72 You can also register your own colour schemes:
74 >> $__shell->registerColourScheme( 'custom', array(
75 .. "default" => PHP_SHELL::C_LIGHT_RED, /* colour of the prompt */
76 .. "value" => PHP_SHELL::C_BLACK, /* colour of a return value */
77 .. "exception" => PHP_SHELL::C_RED, /* colour of a exception */
83 - http://david.acz.org/phpa/
84 - http://www.hping.org/phpinteractive/
85 - the embedded interactive php-shell: $ php -a