Ank
Ank

Reputation: 6270

use php command line

Like the way we can use python in command line from its command line interpreter in order to test whether small code snippets are fine or not, how can I do the same with PHP (or can I)?

ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:22:14) [MSC v.1500 64 bit (AMD64)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> print "abc"
abc
>>>

C:\wamp\bin\php\php5.3.4>php -a
Interactive mode enabled

doesn't give me php prompt

can someone show an example on how do have an interactive shell in php.

Upvotes: 2

Views: 317

Answers (1)

robert
robert

Reputation: 34398

The PHP Manual has a section on command line usage.

There's also details on an interactive shell.

Upvotes: 3

Related Questions