cvs: phpdoc /en/reference/pcre/functions preg-last-error.xml

From: Date: Wed, 05 Dec 2007 23:38:31 +0000
Subject: cvs: phpdoc /en/reference/pcre/functions preg-last-error.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-531@lists.php.net to get a copy of this message
felipe Wed Dec 5 23:38:31 2007 UTC Modified files: /phpdoc/en/reference/pcre/functions preg-last-error.xml Log: Add example http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcre/functions/preg-last-error.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/pcre/functions/preg-last-error.xml diff -u phpdoc/en/reference/pcre/functions/preg-last-error.xml:1.5 phpdoc/en/reference/pcre/functions/preg-last-error.xml:1.6 --- phpdoc/en/reference/pcre/functions/preg-last-error.xml:1.5 Wed Jun 20 22:25:11 2007 +++ phpdoc/en/reference/pcre/functions/preg-last-error.xml Wed Dec 5 23:38:31 2007 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <refentry xml:id="function.preg-last-error" xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>preg_last_error</refname> @@ -15,8 +15,32 @@ <para> Returns the error code of the last PCRE regex execution. </para> - </refsect1> + <para> + <example> + <title><function>preg_last_error</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php + +preg_match('/(?:\D+|<\d+>)*[!?]/', 'foobar foobar foobar'); +if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) { + print 'Backtrack limit was exhausted!'; +} + +?> +]]> + </programlisting> + &example.outputs; + <screen> +<![CDATA[ +Backtrack limit was exhausted! +]]> + </screen> + </example> + </para> + </refsect1> + <refsect1 role="returnvalues"> &reftitle.returnvalues; <para>

« previous php.doc.cvs (#531) next »