Installation:
Sudo-i
cd/opt/
wget http://www.phpsh.org/phpsh-latest.tgz
Tar zxvf phpsh-latest.tgz
CD phpsh/
Sed-i "S#php-q#/usr/local/webserver/php/bin/php-q#g" Phpsh
chmod +x PHPSH
Ln-s/OPT/PHPSH/PHPSH/BIN/PHPSH
Enter PHPSH return Enter
If there is an error, it may be a version conflict such as Python, select the version at the beginning of the script.
OK
php> = array (array), 3)
Array
(
[ 0] = = Array
(
[0] = 1
[1] = > 2
)
[1] = 3
)
php> var _dump (Array (2,3))
Array (2) {
[0]=>
INT (2)
[1]=>
INT (3)
}
php> $str = "string"
Php> = $str
String
php> = Date ("y-m-d")
2014-01-13
php> q
There is an awkward place to output often to write an equal sign at the beginning
More usage
php> = 2 + 3
5
php> = $_
5
php> $x = $_
php> Print $x
5
php> = function_exists
Function_exists
php> = function_exists (' function_exists ')
1
Php> D Array_merge
Documentation requires CTAGS
This article is from the "I Believe" blog, please be sure to keep this source http://mrcelite.blog.51cto.com/2977858/1612519
Command line for more powerful PHP interactions