[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/features/_commandline.xml?=
From: "=?utf-8?q?Daniel_P._Brown?=" <danbrown () php ! net>
Date: 2010-11-29 17:04:30
Message-ID: svn-danbrown-1291050270-305839-1546291798 () svn ! php ! net
[Download RAW message or body]
danbrown Mon, 29 Nov 2010 17:04:30 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=305839
Log:
Rewrite of $argv blurb, which not only contained a typo, but was rather confusing in its present form.
Changed paths:
U phpdoc/en/trunk/features/commandline.xml
Modified: phpdoc/en/trunk/features/commandline.xml
===================================================================
--- phpdoc/en/trunk/features/commandline.xml 2010-11-29 15:50:21 UTC (rev 305838)
+++ phpdoc/en/trunk/features/commandline.xml 2010-11-29 17:04:30 UTC (rev 305839)
@@ -1075,9 +1075,14 @@
can be passed to your script is not limited by PHP (the shell has a certain
size limit in the number of characters which can be passed; usually you won't
hit this limit). The arguments passed to your script are available in the
- global array <varname>$argv</varname>. The zero index always contains the
- script name (which is <literal>-</literal> in case the PHP codeis coming from
- either standard input or from the command line switch <option>-r</option>).
+ global array <varname>$argv</varname>. The first index (zero) always contains the
+ name of the script as called from the command line. Note that, if the code is
+ executed in-line using the command line switch <option>-r</option>, the value of
+ <varname>$argv[0]</varname> will be simply a dash (<literal>-</literal>). The
+ same is true if the code is executed via a pipe from <literal>STDIN</literal>.
+ </para>
+
+ <para>
The second registered global variable is <varname>$argc</varname> which
contains the number of elements in the <varname>$argv</varname> array
(<emphasis role="strong">not</emphasis> the number of arguments passed to the
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic