Command line for more powerful PHP interactions

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.