#42349 [Opn]: -r command line switch doesn't work as documented
| From: | jani@php.net | Date: | Mon, 20 Aug 2007 12:58:43 +0000 |
| Subject: | #42349 [Opn]: -r command line switch doesn't work as documented | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969377768@lists.php.net to get a copy of this message | ||
ID: 42349
Updated by: jani@php.net
Reported By: mjs at beebo dot org
Status: Open
-Bug Type: CGI related
+Bug Type: Documentation problem
Operating System: Windows
PHP Version: 5.2.3
New Comment:
Obviously documentation is mostly written by people who don't use
Windows. IIRC, under windows you need to use double quotes around the
code. ie. This works on win32:
php -r "print_r(get_defined_constants());"
Previous Comments:
------------------------------------------------------------------------
[2007-08-20 12:45:38] mjs at beebo dot org
Description:
------------
The example command-line invocation of PHP described on:
http://uk.php.net/features.commandline
doesn't work:
C:\server\php-5.2.3>php -r 'print_r(get_defined_constants());'
PHP Parse error: syntax error, unexpected $end in Command line code on
line 1
Reproduce code:
---------------
php -r 'print_r(get_defined_constants());'
Expected result:
----------------
A dump of PHP constants.
Actual result:
--------------
PHP error message.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42349&edit=1