WS, prepare for new doc style

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@230197 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2007-02-19 00:04:48 +00:00
parent 459b8be2d4
commit 87176f4374
63 changed files with 1569 additions and 1585 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.12 -->
<refentry id='function.fdf-add-doc-javascript'>
<refnamediv>
@ -31,19 +31,21 @@ fdf_save($fdf);
?>
]]>
</programlisting>
<simpara>will create a FDF like this:</simpara>
<simpara>
will create a FDF like this:
</simpara>
<screen>
<![CDATA[
%FDF-1.2
%âãÏÓ
1 0 obj
<<
/FDF << /JavaScript << /Doc [ (PlusOne)(function PlusOne\(x\)\r{\r return x+1;\r}\r)] >> >>
>>
<<
/FDF << /JavaScript << /Doc [ (PlusOne)(function PlusOne\(x\)\r{\r return x+1;\r}\r)] >> >>
>>
endobj
trailer
<<
/Root 1 0 R
/Root 1 0 R
>>
%%EOF

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.12 -->
<refentry id='function.fdf-add-template'>
<refnamediv>
<refname>fdf_add_template</refname>
<refpurpose>Adds a template into the FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_add_template</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>int</type><parameter>newpage</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
<methodparam><type>int</type><parameter>rename</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<refentry id='function.fdf-add-template'>
<refnamediv>
<refname>fdf_add_template</refname>
<refpurpose>Adds a template into the FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_add_template</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>int</type><parameter>newpage</parameter></methodparam>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam><type>string</type><parameter>template</parameter></methodparam>
<methodparam><type>int</type><parameter>rename</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,25 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-close">
<refnamediv>
<refname>fdf_close</refname>
<refpurpose>Close an FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>fdf_close</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_close</function> function closes the FDF document.</para>
<para>
See also <function>fdf_open</function>.</para>
</refsect1>
</refentry>
<refentry id="function.fdf-close">
<refnamediv>
<refname>fdf_close</refname>
<refpurpose>Close an FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>fdf_close</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_close</function> function closes the FDF document.
</para>
<para>
See also <function>fdf_open</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,25 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-create">
<refnamediv>
<refname>fdf_create</refname>
<refpurpose>Create a new FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>fdf_create</methodname>
<void/>
</methodsynopsis>
<para>
The <function>fdf_create</function> creates a new
FDF document. This function is needed if one would like to
populate input fields in a PDF document with data.</para>
<para>
<example>
<title>Populating a PDF document</title>
<programlisting role="php">
<refentry id="function.fdf-create">
<refnamediv>
<refname>fdf_create</refname>
<refpurpose>Create a new FDF document</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>resource</type><methodname>fdf_create</methodname>
<void/>
</methodsynopsis>
<para>
The <function>fdf_create</function> creates a new
FDF document. This function is needed if one would like to
populate input fields in a PDF document with data.
</para>
<para>
<example>
<title>Populating a PDF document</title>
<programlisting role="php">
<![CDATA[
<?php
$outfdf = fdf_create();
@ -34,16 +35,16 @@ fpassthru($fp);
unlink("outtest.fdf");
?>
]]>
</programlisting>
</example></para>
<para>
See also <function>fdf_close</function>,
<function>fdf_save</function>,
<function>fdf_open</function>.</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>fdf_close</function>,
<function>fdf_save</function>,
<function>fdf_open</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-enum-values">
<refnamediv>
<refname>fdf_enum_values</refname>
<refpurpose>Call a user defined function for each document value </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_enum_values</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
<methodparam choice='opt'><type>mixed</type><parameter>userdata</parameter></methodparam>
</methodsynopsis>
<para>
<!-- $Revision: 1.2 $ -->
<refentry id="function.fdf-enum-values">
<refnamediv>
<refname>fdf_enum_values</refname>
<refpurpose>Call a user defined function for each document value </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_enum_values</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>callback</type><parameter>function</parameter></methodparam>
<methodparam choice='opt'><type>mixed</type><parameter>userdata</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-errno">
<refnamediv>
<refname>fdf_errno</refname>
@ -13,14 +13,14 @@
</methodsynopsis>
<para>
<function>fdf_errno</function> returns the error code set by
the last FDF function call. This is zero
the last FDF function call. This is zero
for a successfull operation or a non-zero error code on failure.
A textual description may be obtained using the
<function>fdf_error</function> function.
A textual description may be obtained using the
<function>fdf_error</function> function.
</para>
<para>
See also <function>fdf_error</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<refentry id="function.fdf-error">
<refnamediv>
<refname>fdf_error</refname>
@ -12,16 +12,16 @@
<methodparam choice='opt'><type>int</type><parameter>error_code</parameter></methodparam>
</methodsynopsis>
<para>
<function>fdf_error</function> returns a textual description for
<function>fdf_error</function> returns a textual description for
the fdf error code given in <parameter>error_code</parameter>.
The function uses the internal error code set by the last operation
if no <parameter>error_code</parameter> is given, so
<literal>fdf_error()</literal> is a convenient shortcut for
The function uses the internal error code set by the last operation
if no <parameter>error_code</parameter> is given, so
<literal>fdf_error()</literal> is a convenient shortcut for
<literal>fdf_error(fdf_errno())</literal>.
</para>
<para>
See also <function>fdf_errno</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- $Revision: 1.2 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-get-ap">
<refnamediv>
@ -19,10 +19,10 @@
The <function>fdf_get_ap</function> function gets the
appearance of a <parameter>field</parameter> (i.e. the value of the /AP key) and
stores it in a file. The possible values of <parameter>face</parameter>
are <constant>FDFNormalAP</constant>, <constant>FDFRolloverAP</constant> and
<constant>FDFDownAP</constant>. The appearance is stored in
are <constant>FDFNormalAP</constant>, <constant>FDFRolloverAP</constant> and
<constant>FDFDownAP</constant>. The appearance is stored in
<parameter>filename</parameter>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-get-attachment">
<refnamediv>
<refname>fdf_get_attachment</refname>
@ -15,10 +15,10 @@
</methodsynopsis>
<para>
Extracts a file uploaded by means of the "file selection" field
<parameter>fieldname</parameter> and stores it under
<parameter>savepath</parameter>. <parameter>savepath</parameter> may be
<parameter>fieldname</parameter> and stores it under
<parameter>savepath</parameter>. <parameter>savepath</parameter> may be
the name of a plain file or an existing directory in which the file is to be created
under its original name. Any existing file under the same name will be overwritten.
under its original name. Any existing file under the same name will be overwritten.
</para>
<note>
<para>
@ -42,7 +42,7 @@
<title>Storing an uploaded file</title>
<programlisting role="php">
<![CDATA[
<?php
<?php
$fdf = fdf_open_string($HTTP_FDF_DATA);
$data = fdf_get_attachment($fdf, "filename", "/tmpdir");
echo "The uploaded file is stored in $data[path]";

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-get-file">
<refnamediv>
@ -17,7 +17,8 @@
of the /F key.
</para>
<para>
See also <function>fdf_set_file</function>.</para>
See also <function>fdf_set_file</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-get-flags">
<refnamediv>
<refname>fdf_get_flags</refname>
<refpurpose>Gets the flags of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>fdf_get_flags</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>whichflags</parameter></methodparam>
</methodsynopsis>
<para>
<!-- $Revision: 1.4 $ -->
<refentry id="function.fdf-get-flags">
<refnamediv>
<refname>fdf_get_flags</refname>
<refpurpose>Gets the flags of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>fdf_get_flags</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>whichflags</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<refentry id="function.fdf-get-opt">
<refnamediv>
<refname>fdf_get_opt</refname>
<refpurpose>Gets a value from the opt array of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>fdf_get_opt</methodname>
<methodparam><type>resource</type><parameter>fdfdof</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam choice='opt'><type>int</type><parameter>element</parameter></methodparam>
</methodsynopsis>
<para>
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-get-opt">
<refnamediv>
<refname>fdf_get_opt</refname>
<refpurpose>Gets a value from the opt array of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>fdf_get_opt</methodname>
<methodparam><type>resource</type><parameter>fdfdof</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam choice='opt'><type>int</type><parameter>element</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-get-value">
<refnamediv>
@ -19,19 +19,19 @@
value for the requested <parameter>fieldname</parameter>.
</para>
<para>
Elements of an array field can be retrieved by passing the optional
Elements of an array field can be retrieved by passing the optional
<parameter>which</parameter>, starting at zero. For non-array fields
the optional parameter <parameter>which</parameter> will be ignored.
</para>
<note>
<para>
Array support and optional <parameter>which</parameter> parameter
were added in PHP 4.3.
Array support and optional <parameter>which</parameter> parameter
were added in PHP 4.3.
</para>
</note>
<para>
See also <function>fdf_set_value</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-get-version">
<refnamediv>
<refname>fdf_get_version</refname>
@ -12,17 +12,17 @@
<methodparam choice='opt'><type>resource</type><parameter>fdf_document</parameter></methodparam>
</methodsynopsis>
<para>
This function will return the fdf version for the given
This function will return the fdf version for the given
<parameter>fdf_document</parameter>, or the toolkit API
version number if no parameter is given.
version number if no parameter is given.
</para>
<para>
<para>
For the current FDF toolkit 5.0 the API version number is '5.0'
and the document version number is either '1.2', '1.3' or '1.4'.
</para>
<para>
See also <function>fdf_set_version</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-header">
<refnamediv>
<refname>fdf_header</refname>
@ -14,8 +14,8 @@
<para>
This is a convenience function to set appropriate HTTP headers
for FDF output. It sets the <literal>Content-type:</literal>
to <literal>application/vnd.fdf</literal>.
</para>
to <literal>application/vnd.fdf</literal>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-next-field-name">
<refnamediv>
@ -26,11 +26,11 @@
<![CDATA[
<?php
$fdf = fdf_open($HTTP_FDF_DATA);
for ($field = fdf_next_field_name($fdf);
$field != "";
for ($field = fdf_next_field_name($fdf);
$field != "";
$field = fdf_next_field_name($fdf, $field)) {
echo "field: $field\n";
}
}
?>
]]>
</programlisting>
@ -38,7 +38,7 @@ for ($field = fdf_next_field_name($fdf);
</para>
<para>
See also <function>fdf_get_value</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.fdf-open-string">
<refnamediv>
<refname>fdf_open_string</refname>
@ -12,10 +12,10 @@
<methodparam><type>string</type><parameter>fdf_data</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_open_string</function> function reads form data
from a string. <parameter>fdf_data</parameter> must contain the data
as returned from a PDF form or created using <function>fdf_create</function>
and <function>fdf_save_string</function>.
The <function>fdf_open_string</function> function reads form data
from a string. <parameter>fdf_data</parameter> must contain the data
as returned from a PDF form or created using <function>fdf_create</function>
and <function>fdf_save_string</function>.
</para>
<para>
You can <function>fdf_open_string</function> together with
@ -37,7 +37,7 @@ fdf_close($fdf);
</example>
</para>
<para>
See also
See also
<function>fdf_open</function>,
<function>fdf_close</function>,
<function>fdf_create</function> and

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-open">
<refnamediv>
@ -15,11 +15,11 @@
<para>
The <function>fdf_open</function> function opens
a file with form data. This file must contain the data as returned
from a PDF form or created using <function>fdf_create</function> and
<function>fdf_save</function>.
from a PDF form or created using <function>fdf_create</function> and
<function>fdf_save</function>.
</para>
<para>
You can process the results of a PDF form POST request by writing
You can process the results of a PDF form POST request by writing
the data received in <varname>$HTTP_FDF_DATA</varname> to a file
and open it using <function>fdf_open</function>. Starting with PHP 4.3
you can also use <function>fdf_open_string</function> which handles temporary
@ -46,7 +46,7 @@ fdf_close($fdf);
</example>
</para>
<para>
See also
See also
<function>fdf_open_string</function>,
<function>fdf_close</function>,
<function>fdf_create</function> and

View file

@ -1,23 +1,23 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<refentry id="function.fdf-remove-item">
<refnamediv>
<refname>fdf_remove_item</refname>
<refpurpose>Sets target frame for form</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_remove_item</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>item</parameter></methodparam>
</methodsynopsis>
<para>
<!-- $Revision: 1.2 $ -->
<refentry id="function.fdf-remove-item">
<refnamediv>
<refname>fdf_remove_item</refname>
<refpurpose>Sets target frame for form</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_remove_item</methodname>
<methodparam><type>resource</type><parameter>fdfdoc</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>item</parameter></methodparam>
</methodsynopsis>
<para>
&warn.undocumented.func;
</para>
</refsect1>
</refentry>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-save-string">
<refnamediv>
<refname>fdf_save_string</refname>
@ -37,18 +37,18 @@ echo $str;
%FDF-1.2
%âãÏÓ
1 0 obj
<<
/FDF << /Fields 2 0 R >>
>>
<<
/FDF << /Fields 2 0 R >>
>>
endobj
2 0 obj
[
<< /T (foo)/V (bar)>>
[
<< /T (foo)/V (bar)>>
]
endobj
trailer
<<
/Root 1 0 R
/Root 1 0 R
>>
%%EOF
@ -56,15 +56,12 @@ trailer
</screen>
</example>
</para>
<para>
See also <function>fdf_save</function>,
<function>fdf_open_string</function>,
<function>fdf_create</function> and
<function>fdf_open_string</function>,
<function>fdf_create</function> and
<function>fdf_close</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-save">
<refnamediv>
@ -15,17 +15,15 @@
</methodsynopsis>
<para>
The <function>fdf_save</function> function saves a FDF document.
The resulting FDF will be written to <parameter>filename</parameter>.
The resulting FDF will be written to <parameter>filename</parameter>.
Without a <parameter>filename</parameter> <function>fdf_save</function>
will write the FDF to the default PHP output stream.
</para>
<para>
See also <function>fdf_save_string</function>,
<function>fdf_create</function> and
<function>fdf_create</function> and
<function>fdf_close</function>.
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-set-ap">
<refnamediv>
@ -20,7 +20,7 @@
The <function>fdf_set_ap</function> function sets the
appearance of a field (i.e. the value of the /AP key).
The possible values of <parameter>face</parameter>
are <constant>FDFNormalAP</constant>, <constant>FDFRolloverAP</constant>
are <constant>FDFNormalAP</constant>, <constant>FDFRolloverAP</constant>
and <constant>FDFDownAP</constant>.
</para>
</refsect1>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.24 -->
<refentry id="function.fdf-set-encoding">
<refnamediv>
@ -11,13 +11,13 @@
<methodsynopsis>
<type>bool</type><methodname>fdf_set_encoding</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
<methodparam><type>string</type><parameter>encoding</parameter></methodparam>
</methodsynopsis>
<para>
<function>fdf_set_encoding</function> sets the character
encoding in FDF document <parameter>fdf_document</parameter>.
<parameter>encoding</parameter> should be the valid encoding
name. Currently the following values are supported:
encoding in FDF document <parameter>fdf_document</parameter>.
<parameter>encoding</parameter> should be the valid encoding
name. Currently the following values are supported:
"<literal>Shift-JIS</literal>", "<literal>UHC</literal>",
"<literal>GBK</literal>","<literal>BigFive</literal>".
An empty string resets the encoding to the default PDFDocEncoding/Unicode

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-set-file">
<refnamediv>
<refname>fdf_set_file</refname>
<refpurpose>Set PDF document to display FDF data in</refpurpose>
</refnamediv>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
@ -17,17 +17,18 @@
<para>
The <function>fdf_set_file</function> selects a different PDF
document to display the form results in then the form it originated
from. The <parameter>url</parameter> needs to be given as an
from. The <parameter>url</parameter> needs to be given as an
absolute URL.
</para>
<para>
The frame to display the document in may be selected using the optional
parameter <parameter>target_frame</parameter> or the function
The frame to display the document in may be selected using the optional
parameter <parameter>target_frame</parameter> or the function
<function>fdf_set_target_frame</function>.
</para>
<example>
<title>Passing FDF data to a second form</title>
<programlisting role="php">
<para>
<example>
<title>Passing FDF data to a second form</title>
<programlisting role="php">
<![CDATA[
<?php
/* set content type for Adobe FDF */
@ -35,7 +36,7 @@
/* start new fdf */
$fdf = fdf_create();
/* set field "foo" to value "bar" */
fdf_set_value($fdf, "foo", "bar");
@ -49,12 +50,13 @@
fdf_close($fdf);
?>
]]>
</programlisting>
</example>
</programlisting>
</example>
</para>
<para>
See also <function>fdf_get_file</function> and
<function>fdf_set_target_frame</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-flags">
<refnamediv>
<refname>fdf_set_flags</refname>
<refpurpose>Sets a flag of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_flags</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>whichFlags</parameter></methodparam>
<methodparam><type>int</type><parameter>newFlags</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_flags</function> sets certain flags
of the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_opt</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.fdf-set-flags">
<refnamediv>
<refname>fdf_set_flags</refname>
<refpurpose>Sets a flag of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_flags</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>whichFlags</parameter></methodparam>
<methodparam><type>int</type><parameter>newFlags</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_flags</function> sets certain flags
of the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_opt</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-javascript-action">
<refnamediv>
<refname>fdf_set_javascript_action</refname>
<refpurpose>Sets an javascript action of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_javascript_action</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>trigger</parameter></methodparam>
<methodparam><type>string</type><parameter>script</parameter></methodparam>
</methodsynopsis>
<para>
<function>fdf_set_javascript_action</function> sets a javascript
action for the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_submit_form_action</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.fdf-set-javascript-action">
<refnamediv>
<refname>fdf_set_javascript_action</refname>
<refpurpose>Sets an javascript action of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_javascript_action</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>trigger</parameter></methodparam>
<methodparam><type>string</type><parameter>script</parameter></methodparam>
</methodsynopsis>
<para>
<function>fdf_set_javascript_action</function> sets a javascript
action for the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_submit_form_action</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id='function.fdf-set-on-import-javascript'>
<refnamediv>
<refname>fdf_set_on_import_javascript</refname>
@ -13,9 +13,7 @@
<methodparam><type>string</type><parameter>script</parameter></methodparam>
<methodparam><type>bool</type><parameter>before_data_import</parameter></methodparam>
</methodsynopsis>
&warn.undocumented.func;
<para>
See also
<function>fdf_add_doc_javascript</function>&listendand;

View file

@ -1,30 +1,30 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-opt">
<refnamediv>
<refname>fdf_set_opt</refname>
<refpurpose>Sets an option of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_opt</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>element</parameter></methodparam>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_opt</function> sets options
of the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_flags</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.fdf-set-opt">
<refnamediv>
<refname>fdf_set_opt</refname>
<refpurpose>Sets an option of a field</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_opt</methodname>
<methodparam><type>resource</type><parameter>fdf_document</parameter></methodparam>
<methodparam><type>string</type><parameter>fieldname</parameter></methodparam>
<methodparam><type>int</type><parameter>element</parameter></methodparam>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
</methodsynopsis>
<para>
The <function>fdf_set_opt</function> sets options
of the given field <parameter>fieldname</parameter>.
</para>
<para>
See also <function>fdf_set_flags</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.2 -->
<refentry id="function.fdf-set-status">
<refnamediv>
<refname>fdf_set_status</refname>
<refpurpose>Set the value of the /STATUS key</refpurpose>
<refpurpose>Set the value of the /STATUS key</refpurpose>
</refnamediv>
<refsect1>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_status</methodname>

View file

@ -1,12 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/fdf.xml, last change in rev 1.6 -->
<refentry id="function.fdf-set-submit-form-action">
<refnamediv>
<refname>fdf_set_submit_form_action</refname>
<refpurpose>Sets a submit form action of a field</refpurpose>
</refnamediv>
<refsect1>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>fdf_set_submit_form_action</methodname>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-set-target-frame">
<refnamediv>
<refname>fdf_set_target_frame</refname>
@ -17,7 +17,7 @@
</para>
<para>
See also <function>fdf_save_file</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<refentry id="function.fdf-set-value">
<refnamediv>
<refname>fdf_set_value</refname>
@ -16,15 +16,15 @@
</methodsynopsis>
<para>
The <function>fdf_set_value</function> function sets the
<parameter>value</parameter> for a field named <parameter>fieldname</parameter>.
<parameter>value</parameter> for a field named <parameter>fieldname</parameter>.
The <parameter>value</parameter> will be stored as a string unless it is an array.
In this case all array elements will be stored as a value array.
In this case all array elements will be stored as a value array.
</para>
<note>
<para>
In older versions of the fdf toolkit last parameter determined if the field value
was to be converted to a PDF Name (<parameter>isName</parameter> = 1)
or set to a PDF String (<parameter>isName</parameter> = 0). The value is no
or set to a PDF String (<parameter>isName</parameter> = 0). The value is no
longer used in the current toolkit version 5.0. For compatibility reasons it is
still supported as an optional parameter beginning with PHP 4.3, but ignored internally.
</para>
@ -33,7 +33,7 @@
</para>
</note>
<para>
See also <function>fdf_get_value</function> and
See also <function>fdf_get_value</function> and
<function>fdf_remove_item</function>.
</para>
</refsect1>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<refentry id="function.fdf-set-version">
<refnamediv>
<refname>fdf_set_version</refname>
@ -16,12 +16,12 @@
This function will set the fdf <parameter>version</parameter>
for the given <parameter>fdf_document</parameter>. Some features
supported by this extension are only available in newer fdf versions.
For the current FDF toolkit 5.0 <parameter>version</parameter>
For the current FDF toolkit 5.0 <parameter>version</parameter>
may be either '1.2', '1.3' or '1.4'.
</para>
<para>
See also <function>fdf_get_version</function>.
</para>
</para>
</refsect1>
</refentry>

View file

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.connection-aborted">
<refnamediv>
<refname>connection_aborted</refname>
<refpurpose>Returns &true; if client disconnected</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>connection_aborted</methodname>
<void/>
</methodsynopsis>
<simpara>
Returns &true; if client disconnected. See the <link
linkend="features.connection-handling">Connection Handling</link>
description in the <link linkend="features">Features</link>
chapter for a complete explanation.
</simpara>
<para>
See also <function>connection_status</function>, and
<function>ignore_user_abort</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.connection-aborted">
<refnamediv>
<refname>connection_aborted</refname>
<refpurpose>Returns &true; if client disconnected</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>connection_aborted</methodname>
<void/>
</methodsynopsis>
<simpara>
Returns &true; if client disconnected. See the <link
linkend="features.connection-handling">Connection Handling</link>
description in the <link linkend="features">Features</link>
chapter for a complete explanation.
</simpara>
<para>
See also <function>connection_status</function>, and
<function>ignore_user_abort</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,29 +1,29 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.connection-status">
<refnamediv>
<refname>connection_status</refname>
<refpurpose>Returns connection status bitfield</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>connection_status</methodname>
<void/>
</methodsynopsis>
<simpara>
Returns the connection status bitfield. See the <link
linkend="features.connection-handling">Connection Handling</link>
description in the <link linkend="features">Features</link>
chapter for a complete explanation.
</simpara>
<para>
See also <function>connection_aborted</function>, and
<function>ignore_user_abort</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.connection-status">
<refnamediv>
<refname>connection_status</refname>
<refpurpose>Returns connection status bitfield</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>connection_status</methodname>
<void/>
</methodsynopsis>
<simpara>
Returns the connection status bitfield. See the <link
linkend="features.connection-handling">Connection Handling</link>
description in the <link linkend="features">Features</link>
chapter for a complete explanation.
</simpara>
<para>
See also <function>connection_aborted</function>, and
<function>ignore_user_abort</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,42 +1,42 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.connection-timeout">
<refnamediv>
<refname>connection_timeout</refname>
<refpurpose>Return &true; if script timed out</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>connection_timeout</methodname>
<void/>
</methodsynopsis>
<simpara>
Returns &true; if script timed out.
</simpara>
<warning>
<title>Deprecated</title>
<simpara>
This function is deprecated, and doesn't even exist anymore
as of 4.0.5.
</simpara>
<!-- so it's quite late to declare it 'deprecated' by now :)
TODO: correct connection handling. Any volunteers?
-->
</warning>
<simpara>
See the <link
linkend="features.connection-handling">Connection Handling</link>
description in the <link linkend="features">Features</link>
chapter for a complete explanation.
</simpara>
<para>
See also <function>connection_status</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.connection-timeout">
<refnamediv>
<refname>connection_timeout</refname>
<refpurpose>Return &true; if script timed out</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>connection_timeout</methodname>
<void/>
</methodsynopsis>
<simpara>
Returns &true; if script timed out.
</simpara>
<warning>
<title>Deprecated</title>
<simpara>
This function is deprecated, and doesn't even exist anymore
as of 4.0.5.
</simpara>
<!-- so it's quite late to declare it 'deprecated' by now :)
TODO: correct connection handling. Any volunteers?
-->
</warning>
<simpara>
See the <link
linkend="features.connection-handling">Connection Handling</link>
description in the <link linkend="features">Features</link>
chapter for a complete explanation.
</simpara>
<para>
See also <function>connection_status</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,34 +1,34 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.38 -->
<refentry id="function.constant">
<refnamediv>
<refname>constant</refname>
<refpurpose>Returns the value of a constant</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>constant</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>constant</function> will return the value of the
constant indicated by <parameter>name</parameter>.
</simpara>
<simpara>
<function>constant</function> is useful if you need to retrieve
the value of a constant, but do not know its name. I.e. it is
stored in a variable or returned by a function.
</simpara>
<simpara>
This function works also with <link
linkend="language.oop5.constants">class constants</link>.
</simpara>
<para>
<example>
<title><function>constant</function> example</title>
<programlisting role="php">
<refentry id="function.constant">
<refnamediv>
<refname>constant</refname>
<refpurpose>Returns the value of a constant</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>constant</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>constant</function> will return the value of the
constant indicated by <parameter>name</parameter>.
</simpara>
<simpara>
<function>constant</function> is useful if you need to retrieve
the value of a constant, but do not know its name. I.e. it is
stored in a variable or returned by a function.
</simpara>
<simpara>
This function works also with <link
linkend="language.oop5.constants">class constants</link>.
</simpara>
<para>
<example>
<title><function>constant</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -39,16 +39,16 @@ echo constant("MAXSIZE"); // same thing as the previous line
?>
]]>
</programlisting>
</example>
</para>
<para>
See also <function>define</function>,
<function>defined</function> and the section on <link
linkend="language.constants">Constants</link>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>define</function>,
<function>defined</function> and the section on <link
linkend="language.constants">Constants</link>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,40 +1,40 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.define">
<refnamediv>
<refname>define</refname>
<refpurpose>Defines a named constant</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>define</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>case_insensitive</parameter></methodparam>
</methodsynopsis>
<para>
Defines a named constant at runtime. See the
<link linkend="language.constants">section on constants</link>
for more details.
</para>
<para>
The name of the constant is given by <parameter>name</parameter>;
the value is given by <parameter>value</parameter>.
</para>
<para>
The optional third parameter
<parameter>case_insensitive</parameter> is also available. If the
value &true; is given, then the constant will be
defined case-insensitive. The default behaviour is
case-sensitive; i.e. CONSTANT and Constant represent different
values.
</para>
<para>
<example>
<title>Defining Constants</title>
<programlisting role="php">
<refentry id="function.define">
<refnamediv>
<refname>define</refname>
<refpurpose>Defines a named constant</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>define</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>case_insensitive</parameter></methodparam>
</methodsynopsis>
<para>
Defines a named constant at runtime. See the
<link linkend="language.constants">section on constants</link>
for more details.
</para>
<para>
The name of the constant is given by <parameter>name</parameter>;
the value is given by <parameter>value</parameter>.
</para>
<para>
The optional third parameter
<parameter>case_insensitive</parameter> is also available. If the
value &true; is given, then the constant will be
defined case-insensitive. The default behaviour is
case-sensitive; i.e. CONSTANT and Constant represent different
values.
</para>
<para>
<example>
<title>Defining Constants</title>
<programlisting role="php">
<![CDATA[
<?php
define("CONSTANT", "Hello world.");
@ -47,19 +47,19 @@ echo Greeting; // outputs "Hello you."
?>
]]>
</programlisting>
</example>
</para>
<para>
&return.success;
</para>
<para>
See also <function>defined</function>,
<function>constant</function> and the section on <link
linkend="language.constants">Constants</link>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
&return.success;
</para>
<para>
See also <function>defined</function>,
<function>constant</function> and the section on <link
linkend="language.constants">Constants</link>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,58 +1,56 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.defined">
<refnamediv>
<refname>defined</refname>
<refpurpose>
Checks whether a given named constant exists
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>defined</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Returns &true; if the named constant given by
<parameter>name</parameter> has been defined,
&false; otherwise.
</para>
<para>
<example>
<title>Checking Constants</title>
<programlisting role="php">
<refentry id="function.defined">
<refnamediv>
<refname>defined</refname>
<refpurpose>Checks whether a given named constant exists</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>defined</methodname>
<methodparam><type>string</type><parameter>name</parameter></methodparam>
</methodsynopsis>
<para>
Returns &true; if the named constant given by
<parameter>name</parameter> has been defined,
&false; otherwise.
</para>
<para>
<example>
<title>Checking Constants</title>
<programlisting role="php">
<![CDATA[
<?php
/* Note the use of quotes, this is important. This example is checking
/* Note the use of quotes, this is important. This example is checking
* if the string 'CONSTANT' is the name of a constant named CONSTANT */
if (defined('CONSTANT')) {
echo CONSTANT;
}
?>
]]>
</programlisting>
</example>
</para>
<note>
<para>
If you want to see if a variable exists, use
<function>isset</function> as <function>defined</function> only
applies to <link linkend="language.constants">constants</link>.
If you want to see if a function exists, use
<function>function_exists</function>.
</para>
</note>
<para>
See also <function>define</function>,
<function>constant</function>,
<function>get_defined_constants</function>,
<function>function_exists</function>, and the section on
<link linkend="language.constants">Constants</link>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<note>
<para>
If you want to see if a variable exists, use
<function>isset</function> as <function>defined</function> only
applies to <link linkend="language.constants">constants</link>.
If you want to see if a function exists, use
<function>function_exists</function>.
</para>
</note>
<para>
See also <function>define</function>,
<function>constant</function>,
<function>get_defined_constants</function>,
<function>function_exists</function>, and the section on
<link linkend="language.constants">Constants</link>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,18 +1,18 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.57 -->
<refentry id="function.die">
<refnamediv>
<refname>die</refname>
<refpurpose>Equivalent to <function>exit</function></refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
This language construct is equivalent to <function>exit</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.die">
<refnamediv>
<refname>die</refname>
<refpurpose>Equivalent to <function>exit</function></refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
This language construct is equivalent to <function>exit</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,55 +1,55 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.16 $ -->
<!-- $Revision: 1.17 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.58 -->
<refentry id="function.eval">
<refnamediv>
<refname>eval</refname>
<refpurpose>Evaluate a string as PHP code</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>eval</methodname>
<methodparam><type>string</type><parameter>code_str</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>eval</function> evaluates the string given in
<parameter>code_str</parameter> as PHP code. Among other things,
this can be useful for storing code in a database text field for
later execution. <parameter>code_str</parameter> does not have to
contain <link linkend="language.basic-syntax.phpmode">PHP Opening
tags</link>.
</simpara>
<simpara>
There are some factors to keep in mind when using
<function>eval</function>. Remember that the string passed must
be valid PHP code, including things like terminating statements
with a semicolon so the parser doesn't die on the line after the
<function>eval</function>, and properly escaping things in
<parameter>code_str</parameter>. To mix HTML output and PHP code
you can use a closing PHP tag to leave PHP mode.
</simpara>
<simpara>
Also remember that variables given values under
<function>eval</function> will retain these values in the main
script afterwards.
</simpara>
<simpara>
A <literal>return</literal> statement will terminate the evaluation of
the string immediately. As of PHP 4, <function>eval</function> returns
&null; unless <literal>return</literal> is called in the evaluated
code, in which case the value passed to <literal>return</literal> is
returned. In case of a parse error in the evaluated code,
<function>eval</function> returns &false;.
In case of a fatal error in the evaluated code, the whole script exits.
In PHP 3, <function>eval</function> does not return a value.
</simpara>
<para>
<example>
<title>
<function>eval</function> example - simple text merge
</title>
<programlisting role="php">
<refentry id="function.eval">
<refnamediv>
<refname>eval</refname>
<refpurpose>Evaluate a string as PHP code</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>eval</methodname>
<methodparam><type>string</type><parameter>code_str</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>eval</function> evaluates the string given in
<parameter>code_str</parameter> as PHP code. Among other things,
this can be useful for storing code in a database text field for
later execution. <parameter>code_str</parameter> does not have to
contain <link linkend="language.basic-syntax.phpmode">PHP Opening
tags</link>.
</simpara>
<simpara>
There are some factors to keep in mind when using
<function>eval</function>. Remember that the string passed must
be valid PHP code, including things like terminating statements
with a semicolon so the parser doesn't die on the line after the
<function>eval</function>, and properly escaping things in
<parameter>code_str</parameter>. To mix HTML output and PHP code
you can use a closing PHP tag to leave PHP mode.
</simpara>
<simpara>
Also remember that variables given values under
<function>eval</function> will retain these values in the main
script afterwards.
</simpara>
<simpara>
A <literal>return</literal> statement will terminate the evaluation of
the string immediately. As of PHP 4, <function>eval</function> returns
&null; unless <literal>return</literal> is called in the evaluated
code, in which case the value passed to <literal>return</literal> is
returned. In case of a parse error in the evaluated code,
<function>eval</function> returns &false;.
In case of a fatal error in the evaluated code, the whole script exits.
In PHP 3, <function>eval</function> does not return a value.
</simpara>
<para>
<example>
<title>
<function>eval</function> example - simple text merge
</title>
<programlisting role="php">
<![CDATA[
<?php
$string = 'cup';
@ -60,22 +60,22 @@ eval("\$str = \"$str\";");
echo $str. "\n";
?>
]]>
</programlisting>
&example.outputs;
<screen>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
This is a $string with my $name in it.
This is a cup with my coffee in it.
]]>
</screen>
</example>
</para>
&tip.ob-capture;
<para>
See also <function>call_user_func</function>.
</para>
</refsect1>
</refentry>
</screen>
</example>
</para>
&tip.ob-capture;
<para>
See also <function>call_user_func</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,46 +1,46 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.11 $ -->
<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.exit">
<refnamediv>
<refname>exit</refname>
<refpurpose>Output a message and terminate the current script</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>exit</methodname>
<methodparam choice="opt"><type>string</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>void</type><methodname>exit</methodname>
<methodparam><type>int</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<note>
<simpara>
This is not a real function, but a language construct.
</simpara>
</note>
<note>
<simpara>
PHP &gt;= 4.2.0 does NOT print the <parameter>status</parameter>
if it is an <type>integer</type>.
</simpara>
</note>
<simpara>
The <function>exit</function> function terminates execution of
the script. It prints <parameter>status</parameter> just before exiting.
</simpara>
<simpara>
If <parameter>status</parameter> is an <type>integer</type>, that value
will also be used as the exit status. Exit statuses should be in the
range 0 to 254, the exit status 255 is reserved by PHP and shall not be
used. The status 0 is used to terminate the program successfully.
</simpara>
<para>
<example>
<title><function>exit</function> example</title>
<programlisting role="php">
<refentry id="function.exit">
<refnamediv>
<refname>exit</refname>
<refpurpose>Output a message and terminate the current script</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>exit</methodname>
<methodparam choice="opt"><type>string</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>void</type><methodname>exit</methodname>
<methodparam><type>int</type><parameter>status</parameter></methodparam>
</methodsynopsis>
<note>
<simpara>
This is not a real function, but a language construct.
</simpara>
</note>
<note>
<simpara>
PHP &gt;= 4.2.0 does NOT print the <parameter>status</parameter>
if it is an <type>integer</type>.
</simpara>
</note>
<simpara>
The <function>exit</function> function terminates execution of
the script. It prints <parameter>status</parameter> just before exiting.
</simpara>
<simpara>
If <parameter>status</parameter> is an <type>integer</type>, that value
will also be used as the exit status. Exit statuses should be in the
range 0 to 254, the exit status 255 is reserved by PHP and shall not be
used. The status 0 is used to terminate the program successfully.
</simpara>
<para>
<example>
<title><function>exit</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -50,13 +50,13 @@ $file = fopen($filename, 'r')
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title><function>exit</function> status example</title>
<programlisting role="php">
</programlisting>
</example>
</para>
<para>
<example>
<title><function>exit</function> status example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -71,19 +71,19 @@ exit(0376); //octal
?>
]]>
</programlisting>
</example>
</para>
<note>
<simpara>
This language construct is equivalent to <function>die</function>.
</simpara>
</note>
<para>
See also: <function>register_shutdown_function</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<note>
<simpara>
This language construct is equivalent to <function>die</function>.
</simpara>
</note>
<para>
See also: <function>register_shutdown_function</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,49 +1,47 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.14 $ -->
<!-- $Revision: 1.15 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.get-browser">
<refnamediv>
<refname>get_browser</refname>
<refpurpose>
Tells what the user's browser is capable of
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>get_browser</methodname>
<methodparam choice="opt"><type>string</type><parameter>user_agent</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return_array</parameter></methodparam>
</methodsynopsis>
<para>
<function>get_browser</function> attempts to determine the
capabilities of the user's browser. This is done by looking up
the browser's information in the <filename>browscap.ini</filename>
file.
</para>
<para>
By default, the value of HTTP User-Agent header is
used; however, you can alter this (i.e., look up another browser's
info) by passing the optional <parameter>user_agent</parameter> parameter to
<function>get_browser</function>. You can bypass <parameter>user_agent</parameter>
parameter with &null; value.
</para>
<simpara>
The information is returned in an <type>object</type>, which will contain
various data elements representing, for instance, the browser's
major and minor version numbers and ID string; &true;/&false; values
for features such as frames, JavaScript, and cookies; and so
forth.
</simpara>
<simpara>
As of PHP 4.3.2, if the optional parameter
<parameter>return_array</parameter> is &true;, this function will return an
<type>array</type> instead of an <type>object</type>.
</simpara>
<para>
<example>
<title>Listing all information about the users browser</title>
<programlisting role="php">
<refentry id="function.get-browser">
<refnamediv>
<refname>get_browser</refname>
<refpurpose>Tells what the user's browser is capable of</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>get_browser</methodname>
<methodparam choice="opt"><type>string</type><parameter>user_agent</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return_array</parameter></methodparam>
</methodsynopsis>
<para>
<function>get_browser</function> attempts to determine the
capabilities of the user's browser. This is done by looking up
the browser's information in the <filename>browscap.ini</filename>
file.
</para>
<para>
By default, the value of HTTP User-Agent header is
used; however, you can alter this (i.e., look up another browser's
info) by passing the optional <parameter>user_agent</parameter> parameter to
<function>get_browser</function>. You can bypass <parameter>user_agent</parameter>
parameter with &null; value.
</para>
<simpara>
The information is returned in an <type>object</type>, which will contain
various data elements representing, for instance, the browser's
major and minor version numbers and ID string; &true;/&false; values
for features such as frames, JavaScript, and cookies; and so
forth.
</simpara>
<simpara>
As of PHP 4.3.2, if the optional parameter
<parameter>return_array</parameter> is &true;, this function will return an
<type>array</type> instead of an <type>object</type>.
</simpara>
<para>
<example>
<title>Listing all information about the users browser</title>
<programlisting role="php">
<![CDATA[
<?php
echo $_SERVER['HTTP_USER_AGENT'] . "\n\n";
@ -52,9 +50,9 @@ $browser = get_browser(null, true);
print_r($browser);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3
@ -73,50 +71,50 @@ Array
[iframes] => 1
[tables] => 1
[cookies] => 1
[backgroundsounds] =>
[vbscript] =>
[backgroundsounds] =>
[vbscript] =>
[javascript] => 1
[javaapplets] => 1
[activexcontrols] =>
[cdf] =>
[aol] =>
[activexcontrols] =>
[cdf] =>
[aol] =>
[beta] => 1
[win16] =>
[crawler] =>
[stripper] =>
[wap] =>
[netclr] =>
[win16] =>
[crawler] =>
[stripper] =>
[wap] =>
[netclr] =>
)
]]>
</screen>
</example>
</para>
<para>
The <literal>cookies</literal> value simply means that the browser
itself is capable of accepting cookies and does not mean the user has
enabled the browser to accept cookies or not. The only way to test if
cookies are accepted is to set one with <function>setcookie</function>,
reload, and check for the value.
</para>
<note>
<para>
In order for this to work, your <link linkend="ini.browscap">browscap</link>
configuration setting in &php.ini; must point to the correct location of the
<filename>browscap.ini</filename> file on your system.
</para>
<para>
<filename>browscap.ini</filename> is not bundled with PHP, but you
may find an <ulink url="&url.browscap.download;">up-to-date php_browscap.ini</ulink>
file here.
</para>
<para>
While <filename>browscap.ini</filename> contains information on
many browsers, it relies on user updates to keep the database
current. The format of the file is fairly self-explanatory.
</para>
</note>
</refsect1>
</refentry>
</screen>
</example>
</para>
<para>
The <literal>cookies</literal> value simply means that the browser
itself is capable of accepting cookies and does not mean the user has
enabled the browser to accept cookies or not. The only way to test if
cookies are accepted is to set one with <function>setcookie</function>,
reload, and check for the value.
</para>
<note>
<para>
In order for this to work, your <link linkend="ini.browscap">browscap</link>
configuration setting in &php.ini; must point to the correct location of the
<filename>browscap.ini</filename> file on your system.
</para>
<para>
<filename>browscap.ini</filename> is not bundled with PHP, but you
may find an <ulink url="&url.browscap.download;">up-to-date php_browscap.ini</ulink>
file here.
</para>
<para>
While <filename>browscap.ini</filename> contains information on
many browsers, it relies on user updates to keep the database
current. The format of the file is fairly self-explanatory.
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,70 +1,70 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.21 $ -->
<!-- $Revision: 1.22 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 -->
<refentry id="function.highlight-file">
<refnamediv>
<refname>highlight_file</refname>
<refpurpose>Syntax highlighting of a file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>highlight_file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>highlight_file</function> function prints out a syntax
highlighted version of the code contained in <parameter>filename</parameter>
using the colors defined in the built-in syntax highlighter for PHP.
</simpara>
<simpara>
If the second parameter <parameter>return</parameter> is set to &true;
then <function>highlight_file</function> will return the highlighted
code as a string instead of printing it out. If the second parameter is
not set to &true; then <function>highlight_file</function> will
return &true; on success, &false; on failure.
</simpara>
&note.uses-ob;
<note>
<simpara>
The <parameter>return</parameter> parameter became available in PHP
4.2.0. Before this time it behaved like the default, which is &false;
</simpara>
</note>
<note>
<simpara>
Since PHP 4.2.1 this function is also affected by <link
linkend="ini.safe-mode">safe_mode</link> and <link
linkend="ini.open-basedir">open_basedir</link>.
</simpara>
</note>
<caution>
<simpara>
Care should be taken when using the
<function>highlight_file</function> function to make sure that
you do not inadvertently reveal sensitive information such as
passwords or any other type of information that might create a
potential security risk.
</simpara>
</caution>
<para>
Many servers are configured to automatically highlight files
with a <emphasis>phps</emphasis> extension. For example,
<filename>example.phps</filename> when viewed will show the
syntax highlighted source of the file. To enable this, add this
line to the &httpd.conf;:
</para>
<screen>
<refentry id="function.highlight-file">
<refnamediv>
<refname>highlight_file</refname>
<refpurpose>Syntax highlighting of a file</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>highlight_file</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>highlight_file</function> function prints out a syntax
highlighted version of the code contained in <parameter>filename</parameter>
using the colors defined in the built-in syntax highlighter for PHP.
</simpara>
<simpara>
If the second parameter <parameter>return</parameter> is set to &true;
then <function>highlight_file</function> will return the highlighted
code as a string instead of printing it out. If the second parameter is
not set to &true; then <function>highlight_file</function> will
return &true; on success, &false; on failure.
</simpara>
&note.uses-ob;
<note>
<simpara>
The <parameter>return</parameter> parameter became available in PHP
4.2.0. Before this time it behaved like the default, which is &false;
</simpara>
</note>
<note>
<simpara>
Since PHP 4.2.1 this function is also affected by <link
linkend="ini.safe-mode">safe_mode</link> and <link
linkend="ini.open-basedir">open_basedir</link>.
</simpara>
</note>
<caution>
<simpara>
Care should be taken when using the
<function>highlight_file</function> function to make sure that
you do not inadvertently reveal sensitive information such as
passwords or any other type of information that might create a
potential security risk.
</simpara>
</caution>
<para>
Many servers are configured to automatically highlight files
with a <emphasis>phps</emphasis> extension. For example,
<filename>example.phps</filename> when viewed will show the
syntax highlighted source of the file. To enable this, add this
line to the &httpd.conf;:
</para>
<screen>
<![CDATA[
AddType application/x-httpd-php-source .phps
]]>
</screen>
<simpara>
See also <function>highlight_string</function>.
</simpara>
</refsect1>
</refentry>
</screen>
<simpara>
See also <function>highlight_string</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,76 +1,76 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 -->
<refentry id="function.highlight-string">
<refnamediv>
<refname>highlight_string</refname>
<refpurpose>Syntax highlighting of a string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>highlight_string</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>highlight_string</function> function outputs a syntax
highlighted version of <parameter>str</parameter> using the colors defined
in the built-in syntax highlighter for PHP.
</simpara>
<simpara>
If the second parameter <parameter>return</parameter> is set to &true;
then <function>highlight_string</function> will return the highlighted
code as a string instead of printing it out. If the second parameter is
not set to &true; then <function>highlight_string</function> will
return &true; on success, &false; on failure.
</simpara>
&note.uses-ob;
<para>
<example>
<title><function>highlight_string</function> example</title>
<programlisting role="php">
<refentry id="function.highlight-string">
<refnamediv>
<refname>highlight_string</refname>
<refpurpose>Syntax highlighting of a string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>highlight_string</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>return</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>highlight_string</function> function outputs a syntax
highlighted version of <parameter>str</parameter> using the colors defined
in the built-in syntax highlighter for PHP.
</simpara>
<simpara>
If the second parameter <parameter>return</parameter> is set to &true;
then <function>highlight_string</function> will return the highlighted
code as a string instead of printing it out. If the second parameter is
not set to &true; then <function>highlight_string</function> will
return &true; on success, &false; on failure.
</simpara>
&note.uses-ob;
<para>
<example>
<title><function>highlight_string</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
highlight_string('<?php phpinfo(); ?>');
?>
]]>
</programlisting>
<para>
The above example will output (in PHP 4):
</para>
<screen>
</programlisting>
<para>
The above example will output (in PHP 4):
</para>
<screen>
<![CDATA[
<code><font color="#000000">
<font color="#0000BB">&lt;?php phpinfo</font><font color="#007700">(); </font><font color="#0000BB">?&gt;</font>
</font>
</code>
]]>
</screen>
<para>
The above example will output (in PHP 5):
</para>
<screen>
</screen>
<para>
The above example will output (in PHP 5):
</para>
<screen>
<![CDATA[
<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php phpinfo</span><span style="color: #007700">(); </span><span style="color: #0000BB">?&gt;</span>
</span>
</code>
]]>
</screen>
</example>
</para>
<note>
<simpara>
The <parameter>return</parameter> parameter became available in PHP
4.2.0. Before this time it behaved like the default, which is &false;
</simpara>
</note>
<simpara>
See also <function>highlight_file</function>.
</simpara>
</refsect1>
</refentry>
</screen>
</example>
</para>
<note>
<simpara>
The <parameter>return</parameter> parameter became available in PHP
4.2.0. Before this time it behaved like the default, which is &false;
</simpara>
</note>
<simpara>
See also <function>highlight_file</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,34 +1,32 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.ignore-user-abort">
<refnamediv>
<refname>ignore_user_abort</refname>
<refpurpose>
Set whether a client disconnect should abort script execution
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ignore_user_abort</methodname>
<methodparam choice="opt"><type>bool</type><parameter>setting</parameter></methodparam>
</methodsynopsis>
<simpara>
This function sets whether a client disconnect should cause a
script to be aborted. It will return the previous setting and
can be called without an argument to not change the current
setting and only return the current setting. See the <link
linkend="features.connection-handling">Connection Handling</link>
section in the <link linkend="features">Features</link> chapter
for a complete description of connection handling in PHP.
</simpara>
<para>
See also <function>connection_aborted</function>, and
<function>connection_status</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.ignore-user-abort">
<refnamediv>
<refname>ignore_user_abort</refname>
<refpurpose>Set whether a client disconnect should abort script execution</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ignore_user_abort</methodname>
<methodparam choice="opt"><type>bool</type><parameter>setting</parameter></methodparam>
</methodsynopsis>
<simpara>
This function sets whether a client disconnect should cause a
script to be aborted. It will return the previous setting and
can be called without an argument to not change the current
setting and only return the current setting. See the <link
linkend="features.connection-handling">Connection Handling</link>
section in the <link linkend="features">Features</link> chapter
for a complete description of connection handling in PHP.
</simpara>
<para>
See also <function>connection_aborted</function>, and
<function>connection_status</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,107 +1,108 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.4 -->
<refentry id="function.pack">
<refnamediv>
<refname>pack</refname>
<refpurpose>Pack data into binary string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>pack</methodname>
<methodparam><type>string</type><parameter>format</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>args</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
Pack given arguments into binary string according to
<parameter>format</parameter>. Returns binary string containing
data.
</para>
<para>
The idea to this function was taken from Perl and all formatting
codes work the same as there, however, there are some formatting
codes that are missing such as Perl's "u" format code. The format
string consists of format codes followed by an optional repeater
argument. The repeater argument can be either an integer value or
* for repeating to the end of the input data. For a, A, h, H the
repeat count specifies how many characters of one data argument
are taken, for @ it is the absolute position where to put the
next data, for everything else the repeat count specifies how
many data arguments are consumed and packed into the resulting
binary string. Currently implemented are
</para>
<para>
<table>
<title><function>pack</function> format characters</title>
<tgroup cols="2">
<thead>
<row>
<entry>Code</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row><entry>a</entry><entry>NUL-padded string</entry></row>
<row><entry>A</entry><entry>SPACE-padded string</entry></row>
<row><entry>h</entry><entry>Hex string, low nibble first</entry></row>
<row><entry>H</entry><entry>Hex string, high nibble first</entry></row>
<row><entry>c</entry><entry>signed char</entry></row>
<row><entry>C</entry><entry>unsigned char</entry></row>
<row><entry>s</entry><entry>signed short (always 16 bit, machine byte order)</entry></row>
<row><entry>S</entry><entry>unsigned short (always 16 bit, machine byte order)</entry></row>
<row><entry>n</entry><entry>unsigned short (always 16 bit, big endian byte order)</entry></row>
<row><entry>v</entry><entry>unsigned short (always 16 bit, little endian byte order)</entry></row>
<row><entry>i</entry><entry>signed integer (machine dependent size and byte order)</entry></row>
<row><entry>I</entry><entry>unsigned integer (machine dependent size and byte order)</entry></row>
<row><entry>l</entry><entry>signed long (always 32 bit, machine byte order)</entry></row>
<row><entry>L</entry><entry>unsigned long (always 32 bit, machine byte order)</entry></row>
<row><entry>N</entry><entry>unsigned long (always 32 bit, big endian byte order)</entry></row>
<row><entry>V</entry><entry>unsigned long (always 32 bit, little endian byte order)</entry></row>
<row><entry>f</entry><entry>float (machine dependent size and representation)</entry></row>
<row><entry>d</entry><entry>double (machine dependent size and representation)</entry></row>
<row><entry>x</entry><entry>NUL byte</entry></row>
<row><entry>X</entry><entry>Back up one byte</entry></row>
<row><entry>@</entry><entry>NUL-fill to absolute position</entry></row>
</tbody>
</tgroup>
</table>
</para>
<para>
<example>
<title><function>pack</function> example</title>
<programlisting role="php">
<refentry id="function.pack">
<refnamediv>
<refname>pack</refname>
<refpurpose>Pack data into binary string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>pack</methodname>
<methodparam><type>string</type><parameter>format</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>args</parameter></methodparam>
<methodparam choice="opt"><type>mixed</type><parameter>...</parameter></methodparam>
</methodsynopsis>
<para>
Pack given arguments into binary string according to
<parameter>format</parameter>. Returns binary string containing
data.
</para>
<para>
The idea to this function was taken from Perl and all formatting
codes work the same as there, however, there are some formatting
codes that are missing such as Perl's "u" format code. The format
string consists of format codes followed by an optional repeater
argument. The repeater argument can be either an integer value or
* for repeating to the end of the input data. For a, A, h, H the
repeat count specifies how many characters of one data argument
are taken, for @ it is the absolute position where to put the
next data, for everything else the repeat count specifies how
many data arguments are consumed and packed into the resulting
binary string. Currently implemented are
</para>
<para>
<table>
<title><function>pack</function> format characters</title>
<tgroup cols="2">
<thead>
<row>
<entry>Code</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row><entry>a</entry><entry>NUL-padded string</entry></row>
<row><entry>A</entry><entry>SPACE-padded string</entry></row>
<row><entry>h</entry><entry>Hex string, low nibble first</entry></row>
<row><entry>H</entry><entry>Hex string, high nibble first</entry></row>
<row><entry>c</entry><entry>signed char</entry></row>
<row><entry>C</entry><entry>unsigned char</entry></row>
<row><entry>s</entry><entry>signed short (always 16 bit, machine byte order)</entry></row>
<row><entry>S</entry><entry>unsigned short (always 16 bit, machine byte order)</entry></row>
<row><entry>n</entry><entry>unsigned short (always 16 bit, big endian byte order)</entry></row>
<row><entry>v</entry><entry>unsigned short (always 16 bit, little endian byte order)</entry></row>
<row><entry>i</entry><entry>signed integer (machine dependent size and byte order)</entry></row>
<row><entry>I</entry><entry>unsigned integer (machine dependent size and byte order)</entry></row>
<row><entry>l</entry><entry>signed long (always 32 bit, machine byte order)</entry></row>
<row><entry>L</entry><entry>unsigned long (always 32 bit, machine byte order)</entry></row>
<row><entry>N</entry><entry>unsigned long (always 32 bit, big endian byte order)</entry></row>
<row><entry>V</entry><entry>unsigned long (always 32 bit, little endian byte order)</entry></row>
<row><entry>f</entry><entry>float (machine dependent size and representation)</entry></row>
<row><entry>d</entry><entry>double (machine dependent size and representation)</entry></row>
<row><entry>x</entry><entry>NUL byte</entry></row>
<row><entry>X</entry><entry>Back up one byte</entry></row>
<row><entry>@</entry><entry>NUL-fill to absolute position</entry></row>
</tbody>
</tgroup>
</table>
</para>
<para>
<example>
<title><function>pack</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66);
?>
]]>
</programlisting>
<para>
The resulting binary string will be 6 bytes long and contain
the byte sequence 0x12, 0x34, 0x78, 0x56, 0x41, 0x42.
</para>
</example>
</para>
</programlisting>
<para>
Note that the distinction between signed and unsigned values only
affects the function <function>unpack</function>, where as
function <function>pack</function> gives the same result for
signed and unsigned format codes.
The resulting binary string will be 6 bytes long and contain
the byte sequence 0x12, 0x34, 0x78, 0x56, 0x41, 0x42.
</para>
<para>
Also note that PHP internally stores <type>integer</type> values as
signed values of a machine dependent size. If you give it an unsigned
integer value too large to be stored that way it is converted to a
<type>float</type> which often yields an undesired result.
</para>
<para>
See also
<function>unpack</function>.
</para>
</refsect1>
</refentry>
</example>
</para>
<para>
Note that the distinction between signed and unsigned values only
affects the function <function>unpack</function>, where as
function <function>pack</function> gives the same result for
signed and unsigned format codes.
</para>
<para>
Also note that PHP internally stores <type>integer</type> values as
signed values of a machine dependent size. If you give it an unsigned
integer value too large to be stored that way it is converted to a
<type>float</type> which often yields an undesired result.
</para>
<para>
See also
<function>unpack</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml

View file

@ -1,11 +1,9 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.php-strip-whitespace">
<refnamediv>
<refname>php_strip_whitespace</refname>
<refpurpose>
Return source with stripped comments and whitespace
</refpurpose>
<refpurpose>Return source with stripped comments and whitespace</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;

View file

@ -1,25 +1,25 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.sleep">
<refnamediv>
<refname>sleep</refname>
<refpurpose>Delay execution</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>sleep</methodname>
<methodparam><type>int</type><parameter>seconds</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>sleep</function> function delays program execution for the
given number of <parameter>seconds</parameter>.
</simpara>
<para>
<example>
<title><function>sleep</function> example</title>
<programlisting role="php">
<refentry id="function.sleep">
<refnamediv>
<refname>sleep</refname>
<refpurpose>Delay execution</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>sleep</methodname>
<methodparam><type>int</type><parameter>seconds</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>sleep</function> function delays program execution for the
given number of <parameter>seconds</parameter>.
</simpara>
<para>
<example>
<title><function>sleep</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -34,24 +34,24 @@ echo date('h:i:s') . "\n";
?>
]]>
</programlisting>
<para>
This example will output (after 10 seconds)
</para>
<screen>
</programlisting>
<para>
This example will output (after 10 seconds)
</para>
<screen>
<![CDATA[
05:31:23
05:31:33
]]>
</screen>
</example>
</para>
<simpara>
See also <function>usleep</function> and
<function>set_time_limit</function>
</simpara>
</refsect1>
</refentry>
</screen>
</example>
</para>
<simpara>
See also <function>usleep</function> and
<function>set_time_limit</function>
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,11 +1,9 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<refentry id="function.time-nanosleep">
<refnamediv>
<refname>time_nanosleep</refname>
<refpurpose>
Delay for a number of seconds and nanoseconds
</refpurpose>
<refpurpose>Delay for a number of seconds and nanoseconds</refpurpose>
</refnamediv>
<refsect1>
&reftitle.description;

View file

@ -1,51 +1,51 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.2 -->
<refentry id="function.uniqid">
<refnamediv>
<refname>uniqid</refname>
<refpurpose>Generate a unique ID</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>uniqid</methodname>
<methodparam choice="opt"><type>string</type><parameter>prefix</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>more_entropy</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>uniqid</function> returns a prefixed unique identifier
based on the current time in microseconds. <parameter>prefix</parameter>
became optional in PHP 5 but can be useful, for instance, if you generate identifiers
simultaneously on several hosts that might happen to generate the
identifier at the same microsecond. Up until PHP 4.3.1,
<parameter>prefix</parameter> could only be a maximum of 114
characters long.
</simpara>
<simpara>
If the optional <parameter>more_entropy</parameter> parameter is
&true;, <function>uniqid</function> will add additional entropy (using
the combined linear congruential generator) at the end of the return
value, which should make the results more unique.
</simpara>
<simpara>
With an empty <parameter>prefix</parameter>, the returned string
will be 13 characters long. If <parameter>more_entropy</parameter> is
&true;, it will be 23 characters.
</simpara>
<note>
<simpara>
The <parameter>prefix</parameter> parameter is required before PHP 5.
</simpara>
</note>
<para>
If you need a unique identifier or token and you intend to give
out that token to the user via the network (i.e. session cookies),
it is recommended that you use something along these lines:
</para>
<para>
<informalexample>
<programlisting role="php">
<refentry id="function.uniqid">
<refnamediv>
<refname>uniqid</refname>
<refpurpose>Generate a unique ID</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>uniqid</methodname>
<methodparam choice="opt"><type>string</type><parameter>prefix</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>more_entropy</parameter></methodparam>
</methodsynopsis>
<simpara>
<function>uniqid</function> returns a prefixed unique identifier
based on the current time in microseconds. <parameter>prefix</parameter>
became optional in PHP 5 but can be useful, for instance, if you generate identifiers
simultaneously on several hosts that might happen to generate the
identifier at the same microsecond. Up until PHP 4.3.1,
<parameter>prefix</parameter> could only be a maximum of 114
characters long.
</simpara>
<simpara>
If the optional <parameter>more_entropy</parameter> parameter is
&true;, <function>uniqid</function> will add additional entropy (using
the combined linear congruential generator) at the end of the return
value, which should make the results more unique.
</simpara>
<simpara>
With an empty <parameter>prefix</parameter>, the returned string
will be 13 characters long. If <parameter>more_entropy</parameter> is
&true;, it will be 23 characters.
</simpara>
<note>
<simpara>
The <parameter>prefix</parameter> parameter is required before PHP 5.
</simpara>
</note>
<para>
If you need a unique identifier or token and you intend to give
out that token to the user via the network (i.e. session cookies),
it is recommended that you use something along these lines:
</para>
<para>
<informalexample>
<programlisting role="php">
<![CDATA[
<?php
// no prefix
@ -56,15 +56,15 @@ $token = md5(uniqid());
$better_token = md5(uniqid(rand(), true));
?>
]]>
</programlisting>
</informalexample>
</para>
<simpara>
This will create a 32 character identifier (a 128 bit hex number)
that is extremely difficult to predict.
</simpara>
</refsect1>
</refentry>
</programlisting>
</informalexample>
</para>
<simpara>
This will create a 32 character identifier (a 128 bit hex number)
that is extremely difficult to predict.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,57 +1,57 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.22 -->
<refentry id="function.unpack">
<refnamediv>
<refname>unpack</refname>
<refpurpose>Unpack data from binary string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>unpack</methodname>
<methodparam><type>string</type><parameter>format</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
<function>unpack</function> from binary string into array
according to <parameter>format</parameter>. Returns array
containing unpacked elements of binary string.
</para>
<para>
<function>unpack</function> works slightly different from Perl as
the unpacked data is stored in an associative array. To
accomplish this you have to name the different format codes and
separate them by a slash /.
<example>
<title><function>unpack</function> example</title>
<programlisting role="php">
<refentry id="function.unpack">
<refnamediv>
<refname>unpack</refname>
<refpurpose>Unpack data from binary string</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>array</type><methodname>unpack</methodname>
<methodparam><type>string</type><parameter>format</parameter></methodparam>
<methodparam><type>string</type><parameter>data</parameter></methodparam>
</methodsynopsis>
<para>
<function>unpack</function> from binary string into array
according to <parameter>format</parameter>. Returns array
containing unpacked elements of binary string.
</para>
<para>
<function>unpack</function> works slightly different from Perl as
the unpacked data is stored in an associative array. To
accomplish this you have to name the different format codes and
separate them by a slash /.
<example>
<title><function>unpack</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
$array = unpack("c2chars/nint", $binarydata);
?>
]]>
</programlisting>
<para>
The resulting array will contain the entries "chars1",
"chars2" and "int".
</para>
</example>
</para>
<caution>
<para>
Note that PHP internally stores integral values as signed. If you
unpack a large unsigned long and it is of the same size as PHP
internally stored values the result will be a negative number
even though unsigned unpacking was specified.
</para>
</caution>
</programlisting>
<para>
See also <function>pack</function> for an explanation of the format
codes.
The resulting array will contain the entries "chars1",
"chars2" and "int".
</para>
</refsect1>
</refentry>
</example>
</para>
<caution>
<para>
Note that PHP internally stores integral values as signed. If you
unpack a large unsigned long and it is of the same size as PHP
internally stored values the result will be a negative number
even though unsigned unpacking was specified.
</para>
</caution>
<para>
See also <function>pack</function> for an explanation of the format
codes.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,26 +1,26 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/misc.xml, last change in rev 1.14 -->
<refentry id="function.usleep">
<refnamediv>
<refname>usleep</refname>
<refpurpose>Delay execution in microseconds</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>usleep</methodname>
<methodparam><type>int</type><parameter>micro_seconds</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>usleep</function> function delays program execution
for the given number of <parameter>micro_seconds</parameter>. A
microsecond is one millionth of a second.
</simpara>
<para>
<example>
<title><function>usleep</function> example</title>
<programlisting role="php">
<refentry id="function.usleep">
<refnamediv>
<refname>usleep</refname>
<refpurpose>Delay execution in microseconds</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>void</type><methodname>usleep</methodname>
<methodparam><type>int</type><parameter>micro_seconds</parameter></methodparam>
</methodsynopsis>
<simpara>
The <function>usleep</function> function delays program execution
for the given number of <parameter>micro_seconds</parameter>. A
microsecond is one millionth of a second.
</simpara>
<para>
<example>
<title><function>usleep</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
@ -35,29 +35,29 @@ echo date('h:i:s') . "\n";
?>
]]>
</programlisting>
<para>
This script will output :
</para>
<screen>
</programlisting>
<para>
This script will output :
</para>
<screen>
<![CDATA[
11:13:28
11:13:30
]]>
</screen>
</example>
</para>
<note>
<simpara>
This function did not work on Windows systems until PHP 5.0.0
</simpara>
</note>
<simpara>
See also <function>sleep</function> and
<function>set_time_limit</function>.
</simpara>
</refsect1>
</refentry>
</screen>
</example>
</para>
<note>
<simpara>
This function did not work on Windows systems until PHP 5.0.0
</simpara>
</note>
<simpara>
See also <function>sleep</function> and
<function>set_time_limit</function>.
</simpara>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,41 +1,40 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-file-diff-binary">
<refnamediv>
<refname>xdiff_file_diff_binary</refname>
<refpurpose>
Make binary diff of two files
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>xdiff_file_diff_binary</methodname>
<methodparam><type>string</type><parameter>file1</parameter></methodparam>
<methodparam><type>string</type><parameter>file2</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
</methodsynopsis>
<refentry id="function.xdiff-file-diff-binary">
<refnamediv>
<refname>xdiff_file_diff_binary</refname>
<refpurpose>Make binary diff of two files</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>xdiff_file_diff_binary</methodname>
<methodparam><type>string</type><parameter>file1</parameter></methodparam>
<methodparam><type>string</type><parameter>file2</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_file_diff_binary</function> makes binary diff of files
<parameter>file1</parameter> and <parameter>file2</parameter> and stores
result in file <parameter>dest</parameter>. This function works with both text
and binary files. Resulting file is in binary format.
</para>
<note>
<para>
Both files will be loaded into memory so ensure that your memory_limit is set high enough.
</para>
</note>
<para>
&return.success;
</para>
<para>
<example>
<title><function>xdiff_file_diff_binary</function> example</title>
<para>
<function>xdiff_file_diff_binary</function> makes binary diff of files
<parameter>file1</parameter> and <parameter>file2</parameter> and stores
result in file <parameter>dest</parameter>. This function works with both text
and binary files. Resulting file is in binary format.
The following code makes binary diff of two archives.
</para>
<note>
<para>
Both files will be loaded into memory so ensure that your memory_limit is set high enough.
</para>
</note>
<para>
&return.success;
</para>
<example>
<title><function>xdiff_file_diff_binary</function> example</title>
<para>
The following code makes binary diff of two archives.
</para>
<programlisting role="php">
<programlisting role="php">
<![CDATA[
<?php
$old_version = 'my_script_1.0.tgz';
@ -44,13 +43,14 @@ $new_version = 'my_script_1.1.tgz';
xdiff_file_diff_binary($old_version, $new_version, 'my_script.bdiff');
?>
]]>
</programlisting>
</example>
<para>
See also <function>xdiff_string_diff_binary</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>xdiff_string_diff_binary</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,47 +1,46 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-file-diff">
<refnamediv>
<refname>xdiff_file_diff</refname>
<refpurpose>
Make unified diff of two files
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>xdiff_file_diff</methodname>
<methodparam><type>string</type><parameter>file1</parameter></methodparam>
<methodparam><type>string</type><parameter>file2</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>context</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>minimal</parameter></methodparam>
</methodsynopsis>
<refentry id="function.xdiff-file-diff">
<refnamediv>
<refname>xdiff_file_diff</refname>
<refpurpose>Make unified diff of two files</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>xdiff_file_diff</methodname>
<methodparam><type>string</type><parameter>file1</parameter></methodparam>
<methodparam><type>string</type><parameter>file2</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>context</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>minimal</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_file_diff</function> makes unified diff of files
<parameter>file1</parameter> and <parameter>file2</parameter> and stores
result in file <parameter>dest</parameter>.
<parameter>context</parameter> indicated how many lines of context you
want to include in diff result. Set <parameter>minimal</parameter> to
&true; if you want to minimalize size of diff (can take a long time).
Resulting file is human-readable.
</para>
<note>
<para>
This function doesn't work well with binary files. To make diff of binary
files use <function>xdiff_file_diff_binary</function>.
</para>
</note>
<para>
&return.success;
</para>
<para>
<example>
<title><function>xdiff_file_diff</function> example</title>
<para>
<function>xdiff_file_diff</function> makes unified diff of files
<parameter>file1</parameter> and <parameter>file2</parameter> and stores
result in file <parameter>dest</parameter>.
<parameter>context</parameter> indicated how many lines of context you
want to include in diff result. Set <parameter>minimal</parameter> to
&true; if you want to minimalize size of diff (can take a long time).
Resulting file is human-readable.
The following code makes unified diff of two php files.
</para>
<note>
<para>
This function doesn't work well with binary files. To make diff of binary
files use <function>xdiff_file_diff_binary</function>.
</para>
</note>
<para>
&return.success;
</para>
<example>
<title><function>xdiff_file_diff</function> example</title>
<para>
The following code makes unified diff of two php files.
</para>
<programlisting role="php">
<programlisting role="php">
<![CDATA[
<?php
$old_version = 'my_script.php';
@ -50,13 +49,14 @@ $new_version = 'my_new_script.php';
xdiff_file_diff($old_version, $new_version, 'my_script.diff', 2);
?>
]]>
</programlisting>
</example>
<para>
See also <function>xdiff_string_diff</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>xdiff_string_diff</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,38 +1,37 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-file-merge3">
<refnamediv>
<refname>xdiff_file_merge3</refname>
<refpurpose>
Merge 3 files into one
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>xdiff_file_merge3</methodname>
<methodparam><type>string</type><parameter>file1</parameter></methodparam>
<methodparam><type>string</type><parameter>file2</parameter></methodparam>
<methodparam><type>string</type><parameter>file3</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
</methodsynopsis>
<refentry id="function.xdiff-file-merge3">
<refnamediv>
<refname>xdiff_file_merge3</refname>
<refpurpose>Merge 3 files into one</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>xdiff_file_merge3</methodname>
<methodparam><type>string</type><parameter>file1</parameter></methodparam>
<methodparam><type>string</type><parameter>file2</parameter></methodparam>
<methodparam><type>string</type><parameter>file3</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_file_merge3</function> merges files
<parameter>file1</parameter>, <parameter>file2</parameter> and
<parameter>file3</parameter> into one and stores result in file
<parameter>dest</parameter>.
</para>
<para>
Returns &true; if merge was successful, string with rejected chunks if
it was not or &false; if an internal error happened.
</para>
<para>
<example>
<title><function>xdiff_file_merge3</function> example</title>
<para>
<function>xdiff_file_merge3</function> merges files
<parameter>file1</parameter>, <parameter>file2</parameter> and
<parameter>file3</parameter> into one and stores result in file
<parameter>dest</parameter>.
The following code merges three files into one.
</para>
<para>
Returns &true; if merge was successful, string with rejected chunks if
it was not or &false; if an internal error happened.
</para>
<example>
<title><function>xdiff_file_merge3</function> example</title>
<para>
The following code merges three files into one.
</para>
<programlisting role="php">
<programlisting role="php">
<![CDATA[
<?php
$old_version = 'original_script.php';
@ -46,13 +45,14 @@ if (is_string($errors)) {
}
?>
]]>
</programlisting>
</example>
<para>
See also <function>xdiff_string_merge3</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>xdiff_string_merge3</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,41 +1,40 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-file-patch-binary">
<refnamediv>
<refname>xdiff_file_patch_binary</refname>
<refpurpose>
Patch a file with a binary diff
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>xdiff_file_patch_binary</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
</methodsynopsis>
<refentry id="function.xdiff-file-patch-binary">
<refnamediv>
<refname>xdiff_file_patch_binary</refname>
<refpurpose>Patch a file with a binary diff</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>bool</type><methodname>xdiff_file_patch_binary</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_file_patch_binary</function> patches file
<parameter>file</parameter> with binary patch in file
<parameter>patch</parameter> and stores result in file
<parameter>dest</parameter>.
</para>
<note>
<para>
Both files (file and patch) will be loaded into memory so ensure that your memory_limit is set high enough.
</para>
</note>
<para>
&return.success;
</para>
<para>
<example>
<title><function>xdiff_file_patch_binary</function> example</title>
<para>
<function>xdiff_file_patch_binary</function> patches file
<parameter>file</parameter> with binary patch in file
<parameter>patch</parameter> and stores result in file
<parameter>dest</parameter>.
The following code applies binary diff to a file.
</para>
<note>
<para>
Both files (file and patch) will be loaded into memory so ensure that your memory_limit is set high enough.
</para>
</note>
<para>
&return.success;
</para>
<example>
<title><function>xdiff_file_patch_binary</function> example</title>
<para>
The following code applies binary diff to a file.
</para>
<programlisting role="php">
<programlisting role="php">
<![CDATA[
<?php
$old_version = 'archive-1.0.tgz';
@ -50,13 +49,14 @@ if ($result) {
?>
]]>
</programlisting>
</example>
<para>
See also <function>xdiff_string_patch_binary</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>xdiff_string_patch_binary</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,43 +1,42 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-file-patch">
<refnamediv>
<refname>xdiff_file_patch</refname>
<refpurpose>
Patch a file with an unified diff
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>xdiff_file_patch</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<refentry id="function.xdiff-file-patch">
<refnamediv>
<refname>xdiff_file_patch</refname>
<refpurpose>Patch a file with an unified diff</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>xdiff_file_patch</methodname>
<methodparam><type>string</type><parameter>file</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
<methodparam><type>string</type><parameter>dest</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_file_patch</function> patches file
<parameter>file</parameter> with unified patch in file
<parameter>patch</parameter> and stores result in file
<parameter>dest</parameter>.
</para>
<para>
<parameter>flags</parameter> can be either
<constant>XDIFF_PATCH_NORMAL</constant> (default mode, normal patch) or
<constant>XDIFF_PATCH_REVERSE</constant> (reversed patch).
</para>
<para>
Returns &false; if an internal error happened, string with rejected
chunks of patch or &true; if patch has been successfully applied.
</para>
<para>
<example>
<title><function>xdiff_file_patch</function> example</title>
<para>
<function>xdiff_file_patch</function> patches file
<parameter>file</parameter> with unified patch in file
<parameter>patch</parameter> and stores result in file
<parameter>dest</parameter>.
The following code applies unified diff to a file.
</para>
<para>
<parameter>flags</parameter> can be either
<constant>XDIFF_PATCH_NORMAL</constant> (default mode, normal patch) or
<constant>XDIFF_PATCH_REVERSE</constant> (reversed patch).
</para>
<para>
Returns &false; if an internal error happened, string with rejected
chunks of patch or &true; if patch has been successfully applied.
</para>
<example>
<title><function>xdiff_file_patch</function> example</title>
<para>
The following code applies unified diff to a file.
</para>
<programlisting role="php">
<programlisting role="php">
<![CDATA[
<?php
$old_version = 'my_script-1.0.php';
@ -51,14 +50,14 @@ if (is_string($errors)) {
?>
]]>
</programlisting>
</example>
<example>
<title>Patch reversing example</title>
<para>
The following code reverses a patch.
</para>
<programlisting role="php">
</programlisting>
</example>
<example>
<title>Patch reversing example</title>
<para>
The following code reverses a patch.
</para>
<programlisting role="php">
<![CDATA[
<?php
$new_version = 'my_script-1.1.php';
@ -72,13 +71,14 @@ if (is_string($errors)) {
?>
]]>
</programlisting>
</example>
<para>
See also <function>xdiff_string_patch</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>xdiff_string_patch</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,32 +1,30 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-string-diff-binary">
<refnamediv>
<refname>xdiff_string_diff_binary</refname>
<refpurpose>
Make binary diff of two strings
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_diff_binary</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_diff_binary</function> makes binary diff of
strings <parameter>str1</parameter> and <parameter>str2</parameter>.
</para>
<para>
Returns string with result or &false; if an internal error happened.
</para>
<para>
See also <function>xdiff_file_diff_binary</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.xdiff-string-diff-binary">
<refnamediv>
<refname>xdiff_string_diff_binary</refname>
<refpurpose>Make binary diff of two strings</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_diff_binary</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_diff_binary</function> makes binary diff of
strings <parameter>str1</parameter> and <parameter>str2</parameter>.
</para>
<para>
Returns string with result or &false; if an internal error happened.
</para>
<para>
See also <function>xdiff_file_diff_binary</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,44 +1,43 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-string-diff">
<refnamediv>
<refname>xdiff_string_diff</refname>
<refpurpose>
Make unified diff of two strings
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_diff</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>context</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>minimal</parameter></methodparam>
</methodsynopsis>
<refentry id="function.xdiff-string-diff">
<refnamediv>
<refname>xdiff_string_diff</refname>
<refpurpose>Make unified diff of two strings</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_diff</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>context</parameter></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>minimal</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_diff</function> makes unified diff of strings
<parameter>str1</parameter> and <parameter>str2</parameter>.
<parameter>context</parameter> indicated how many lines of context you
want to include in diff result. Set <parameter>minimal</parameter> to
&true; if you want to minimalize size of diff (can take a long time).
</para>
<note>
<para>
This function doesn't work well with binary strings. To make diff of binary
strings use <function>xdiff_string_diff_binary</function>.
</para>
</note>
<para>
Returns string with result or &false; if an internal error happened.
</para>
<para>
<example>
<title><function>xdiff_string_diff</function> example</title>
<para>
<function>xdiff_string_diff</function> makes unified diff of strings
<parameter>str1</parameter> and <parameter>str2</parameter>.
<parameter>context</parameter> indicated how many lines of context you
want to include in diff result. Set <parameter>minimal</parameter> to
&true; if you want to minimalize size of diff (can take a long time).
The following code makes unified diff of two articles.
</para>
<note>
<para>
This function doesn't work well with binary strings. To make diff of binary
strings use <function>xdiff_string_diff_binary</function>.
</para>
</note>
<para>
Returns string with result or &false; if an internal error happened.
</para>
<example>
<title><function>xdiff_string_diff</function> example</title>
<para>
The following code makes unified diff of two articles.
</para>
<programlisting role="php">
<programlisting role="php">
<![CDATA[
<?php
$old_article = file_get_contents('./old_article.txt');
@ -52,13 +51,14 @@ if (is_string($diff)) {
?>
]]>
</programlisting>
</example>
<para>
See also <function>xdiff_file_diff</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
See also <function>xdiff_file_diff</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,40 +1,38 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.6 $ -->
<!-- $Revision: 1.7 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-string-merge3">
<refnamediv>
<refname>xdiff_string_merge3</refname>
<refpurpose>
Merge 3 strings into one
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>xdiff_string_merge3</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
<methodparam><type>string</type><parameter>str3</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">error</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_merge3</function> merges strings
<parameter>str1</parameter>, <parameter>str2</parameter> and
<parameter>str3</parameter> into one.
</para>
<para>
If <parameter>error</parameter> is passed then rejected parts are stored
inside this variable.
</para>
<para>
Returns merged string, &false; if an internal error happened, or &true;
if merged string is empty.
</para>
<para>
See also <function>xdiff_file_merge3</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.xdiff-string-merge3">
<refnamediv>
<refname>xdiff_string_merge3</refname>
<refpurpose>Merge 3 strings into one</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>mixed</type><methodname>xdiff_string_merge3</methodname>
<methodparam><type>string</type><parameter>str1</parameter></methodparam>
<methodparam><type>string</type><parameter>str2</parameter></methodparam>
<methodparam><type>string</type><parameter>str3</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">error</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_merge3</function> merges strings
<parameter>str1</parameter>, <parameter>str2</parameter> and
<parameter>str3</parameter> into one.
</para>
<para>
If <parameter>error</parameter> is passed then rejected parts are stored
inside this variable.
</para>
<para>
Returns merged string, &false; if an internal error happened, or &true;
if merged string is empty.
</para>
<para>
See also <function>xdiff_file_merge3</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,33 +1,31 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.2 $ -->
<!-- $Revision: 1.3 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-string-patch-binary">
<refnamediv>
<refname>xdiff_string_patch_binary</refname>
<refpurpose>
Patch a string with a binary diff
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_patch_binary</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_patch_binary</function> patches string
<parameter>str</parameter> with binary patch in string
<parameter>patch</parameter>.
</para>
<para>
Returns a patched string.
</para>
<para>
See also <function>xdiff_file_patch_binary</function>.
</para>
</refsect1>
</refentry>
<refentry id="function.xdiff-string-patch-binary">
<refnamediv>
<refname>xdiff_string_patch_binary</refname>
<refpurpose>Patch a string with a binary diff</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_patch_binary</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_patch_binary</function> patches string
<parameter>str</parameter> with binary patch in string
<parameter>patch</parameter>.
</para>
<para>
Returns a patched string.
</para>
<para>
See also <function>xdiff_file_patch_binary</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:

View file

@ -1,42 +1,41 @@
<?xml version='1.0' encoding='iso-8859-1'?>
<!-- $Revision: 1.5 $ -->
<!-- $Revision: 1.6 $ -->
<!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
<refentry id="function.xdiff-string-patch">
<refnamediv>
<refname>xdiff_string_patch</refname>
<refpurpose>
Patch a string with an unified diff
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_patch</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">error</parameter></methodparam>
</methodsynopsis>
<refentry id="function.xdiff-string-patch">
<refnamediv>
<refname>xdiff_string_patch</refname>
<refpurpose>Patch a string with an unified diff</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>string</type><methodname>xdiff_string_patch</methodname>
<methodparam><type>string</type><parameter>str</parameter></methodparam>
<methodparam><type>string</type><parameter>patch</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>flags</parameter></methodparam>
<methodparam choice="opt"><type>string</type><parameter role="reference">error</parameter></methodparam>
</methodsynopsis>
<para>
<function>xdiff_string_patch</function> patches string
<parameter>str</parameter> with unified patch in string
<parameter>patch</parameter>.
</para>
<para>
<parameter>flags</parameter> can be either
<constant>XDIFF_PATCH_NORMAL</constant> (default mode, normal patch) or
<constant>XDIFF_PATCH_REVERSE</constant> (reversed patch).
</para>
<para>
If <parameter>error</parameter> is passed then rejected parts are stored
inside this variable.
</para>
<para>
<example>
<title><function>xdiff_string_patch</function> example</title>
<para>
<function>xdiff_string_patch</function> patches string
<parameter>str</parameter> with unified patch in string
<parameter>patch</parameter>.
The following code applies changes to some article.
</para>
<para>
<parameter>flags</parameter> can be either
<constant>XDIFF_PATCH_NORMAL</constant> (default mode, normal patch) or
<constant>XDIFF_PATCH_REVERSE</constant> (reversed patch).
</para>
<para>
If <parameter>error</parameter> is passed then rejected parts are stored
inside this variable.
</para>
<example>
<title><function>xdiff_string_patch</function> example</title>
<para>
The following code applies changes to some article.
</para>
<programlisting role="php">
<programlisting role="php">
<![CDATA[
<?php
$old_article = file_get_contents('./old_article.txt');
@ -57,16 +56,17 @@ if (strlen($errors)) {
?>
]]>
</programlisting>
</example>
<para>
Returns a patched string.
</para>
<para>
See also <function>xdiff_file_patch</function>.
</para>
</refsect1>
</refentry>
</programlisting>
</example>
</para>
<para>
Returns a patched string.
</para>
<para>
See also <function>xdiff_file_patch</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables: