note 91343 added to features.commandline
| From: | coffear at gmail dot com | Date: | Sun, 07 Jun 2009 00:06:01 +0000 |
| Subject: | note 91343 added to features.commandline | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156425@lists.php.net to get a copy of this message | ||
In the notes it there is an example of running 1 line of PHP using:
php -r 'print_r(get_defined_constants());'
This might work on a UNIX machine but unfortunately on windows it produces the following error
message:
Parse error: parse error in Command line code on line 1
Instead of using ' (single quotes) to encompass the PHP code use " (double quotes)
instead. You can safely use ' within the code itself however such as:
php -r "echo 'hello';"
----
Server IP: 92.48.74.199
Probable Submitter: 86.133.42.97
----
Manual Page -- http://www.php.net/manual/en/features.commandline.php
Edit -- https://master.php.net/note/edit/91343
Del: integrated -- https://master.php.net/note/delete/91343/integrated
Del: useless -- https://master.php.net/note/delete/91343/useless
Del: bad code -- https://master.php.net/note/delete/91343/bad+code
Del: spam -- https://master.php.net/note/delete/91343/spam
Del: non-english -- https://master.php.net/note/delete/91343/non-english
Del: in docs -- https://master.php.net/note/delete/91343/in+docs
Del: other reasons-- https://master.php.net/note/delete/91343
Reject -- https://master.php.net/note/reject/91343
Search -- https://master.php.net/manage/user-notes.php