[ Article Author: Zhang banquet this article version: V1.0 last modified: 2009.01.13 reprinted please indicate the original article link: http://blog.s135.com/post/392/]
Phpsh is an interactive PHP shell developed by the Facebook team to facilitate PHP command line testing.
URL: http://www.phpsh.org/
Installation Method:CD/opt/
Wget http://www.phpsh.org/phpsh-latest.tgz
Tar zxvf phpsh-latest.tgz
Copy the src directory and rename it phpsh.
Clear the paths obtained before RC. php In phpsh. php.
Chmod + x phpsh
Ln-S/XXX/phpsh/bin/phpsh
Example: [Root @ localhost ~] # Phpsh
I can't find a tags file for you. To enable tab completion in phpsh,
Go to the root directory of your PHP code and run 'ctags-R ',
(Or whatever the analagous command is with your version of ctags ,)
Then run phpsh from that directory or a subdirectory of that directory.
CommandLine:/usr/local/webserver/PHP/bin/PHP-Q/opt/phpsh. php
Phpsh (c) 2006 by Charlie Cheever and Dan Corson and Facebook, Inc.
Type 'H' or 'help' to see instructions & features
New Feature: You can use the-C option to turn off coloring
Php> = 3 + 4
7
Php> = MD5 ("zhangyan ")
28f91f3a4b62ce57b7a533e742e8aae1
Php> Echo date ("Y-m-d h: I: s ")
15:28:19
Php> $ Var = "blog.s135.com"
Php> Echo $ VaR
Blog.s135.com
Php> $ Array = array (Array (1, 2, 3), array ("A" => "B", "C" => "D ", "E" => "F"), 'G', 'H ')
Php> = $ Array
Array
(
[0] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
[1] => Array
(
[A] => B
[C] => d
[E] => F
)
[2] => G
[3] => H
)
Php> Q
[Root @ localhost ~] # Phpsh