bjori Mon Feb 5 21:01:02 2007 UTC
Modified files:
/phpdoc/en/features commandline.xml
Log:
Whopsy. Lets make docbook happy and replace <title> less <example>s with
<informalexample>
http://cvs.php.net/viewvc.cgi/phpdoc/en/features/commandline.xml?r1=1.43&r2=1.44&diff_format=u
Index: phpdoc/en/features/commandline.xml
diff -u phpdoc/en/features/commandline.xml:1.43
phpdoc/en/features/commandline.xml:1.44
--- phpdoc/en/features/commandline.xml:1.43 Mon Feb 5 20:20:16 2007
+++ phpdoc/en/features/commandline.xml Mon Feb 5 21:01:02 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.43 $ -->
+<!-- $Revision: 1.44 $ -->
<chapter id="features.commandline">
<title>Using PHP from the command line</title>
<para>
@@ -294,7 +294,7 @@
role="strong">not</emphasis> change the current directory to the directory
of the executed script!
</para>
- <example>
+ <informalexample>
<para>
Example showing the difference to the <literal>CGI SAPI</literal>:
</para>
@@ -337,7 +337,7 @@
<para>
This allows greater flexibility when writing shell tools in PHP.
</para>
- </example>
+ </informalexample>
<note>
<para>
The <literal>CGI SAPI</literal> supports this <literal>CLI SAPI</literal>
@@ -395,7 +395,7 @@
<para>
Telling PHP to execute a certain file.
</para>
- <example>
+ <informalexample>
<screen>
<![CDATA[
php my_script.php
@@ -403,7 +403,7 @@
php -f my_script.php
]]>
</screen>
- </example>
+ </informalexample>
<para>
Both ways (whether using the <option>-f</option> switch or not) execute
the file <filename>my_script.php</filename>. You can choose any file to
@@ -417,13 +417,13 @@
Pass the PHP code to execute directly on the command
line.
</para>
- <example>
+ <informalexample>
<screen>
<![CDATA[
php -r 'print_r(get_defined_constants());'
]]>
</screen>
- </example>
+ </informalexample>
<para>
Special care has to be taken in regards of shell variable substitution and
quoting usage.
@@ -446,13 +446,13 @@
PHP code and feed it to the binary, as shown in this
(fictional) example:
</para>
- <example>
+ <informalexample>
<screen>
<![CDATA[
$ some_application | some_filter | php | sort -u >final_output.txt
]]>
</screen>
- </example>
+ </informalexample>
</listitem>
</orderedlist>
You cannot combine any of the three ways to execute code.
@@ -482,7 +482,7 @@
PHP, every argument following it is passed
untouched to your script.
</para>
- <example>
+ <informalexample>
<screen>
<![CDATA[
# This will not execute the given code but will show the PHP usage
@@ -500,7 +500,7 @@
}
]]>
</screen>
- </example>
+ </informalexample>
<para>
However, there's another way of using PHP for shell
scripting. You can write a script where the first line starts with
@@ -591,7 +591,7 @@
&php.ini; or specify a custom <literal>INI</literal> file
(which does not need to be named &php.ini;), e.g.:
</para>
- <example>
+ <para><informalexample>
<screen>
<![CDATA[
$ php -c /custom/directory/ my_script.php
@@ -599,7 +599,7 @@
$ php -c /custom/directory/custom-file.ini my_script.php
]]>
</screen>
- </example>
+ </informalexample></para>
<para>
If you don't specify this option, file is searched in
<link linkend="configuration.file">default locations</link>.
@@ -628,7 +628,7 @@
]]>
</screen>
</para>
- <example>
+ <para><informalexample>
<para>
Examples (lines are wrapped for layout reasons):
</para>
@@ -654,7 +654,7 @@
string(15) "doesntmakesense"
]]>
</screen>
- </example>
+ </informalexample></para>
</entry>
</row>
<row>
@@ -728,7 +728,7 @@
<entry>-m</entry>
<entry>--modules</entry>
<entry>
- <example>
+ <para><informalexample>
<para>
Using this option, PHP prints out the built in (and loaded) PHP and
Zend modules:
@@ -751,7 +751,7 @@
[Zend Modules]
]]>
</screen>
- </example>
+ </informalexample></para>
</entry>
</row>
<row>
@@ -771,7 +771,7 @@
to not collide with command line variable substitution done by the
shell.
</para>
- <example>
+ <informalexample>
<para>
Example showing a parser error
</para>
@@ -781,7 +781,7 @@
Command line code(1) : Parse error - parse error, unexpected '='
]]>
</screen>
- </example>
+ </informalexample>
<para>
The problem here is that the sh/bash performs variable substitution
even when using double quotes <literal>"</literal>. Since the
@@ -789,7 +789,7 @@
expands to nothing which results in the code passed to
PHP for execution actually reading:
</para>
- <example>
+ <informalexample>
<screen>
<![CDATA[
$ php -r " = get_defined_constants();"
@@ -816,7 +816,7 @@
[...]
]]>
</screen>
- </example>
+ </informalexample>
<para>
If you are using a shell different from sh/bash, you might experience
further issues. Feel free to open a bug report at
@@ -884,7 +884,7 @@
<para>
PHP code to execute after processing the input. Added in PHP 5.
</para>
- <example>
+ <para><example>
<title>Using the <option>-B</option>, <option>-R</option> and
<option>-E</option> options to count the number of lines of a
project.
@@ -895,7 +895,7 @@
Total Lines: 37328
]]>
</screen>
- </example>
+ </example></para>
</entry>
</row>
<row>
@@ -924,7 +924,7 @@
<entry>-v</entry>
<entry>--version</entry>
<entry>
- <example>
+ <para><informalexample>
<para>
Writes the PHP, PHP SAPI, and Zend version to standard output, e.g.
</para>
@@ -935,7 +935,7 @@
Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies
]]>
</screen>
- </example>
+ </informalexample></para>
</entry>
</row>
<row>