From cdaad7fc5e4760ae4f8a1d0334ea07da4c0a62c9 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Wed, 5 Dec 2007 23:38:31 +0000 Subject: [PATCH] Add example git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@247676 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/pcre/functions/preg-last-error.xml | 28 ++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/reference/pcre/functions/preg-last-error.xml b/reference/pcre/functions/preg-last-error.xml index f4981d2b4f..e1bcb6a2bb 100644 --- a/reference/pcre/functions/preg-last-error.xml +++ b/reference/pcre/functions/preg-last-error.xml @@ -1,5 +1,5 @@ - + preg_last_error @@ -15,8 +15,32 @@ Returns the error code of the last PCRE regex execution. - + + + <function>preg_last_error</function> example + +)*[!?]/', 'foobar foobar foobar'); + +if (preg_last_error() == PREG_BACKTRACK_LIMIT_ERROR) { + print 'Backtrack limit was exhausted!'; +} + +?> +]]> + + &example.outputs; + + + + + + + &reftitle.returnvalues;