Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:22714 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 715 invoked by uid 1010); 11 Apr 2006 18:23:17 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 700 invoked from network); 11 Apr 2006 18:23:17 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Apr 2006 18:23:17 -0000 X-Host-Fingerprint: 204.11.219.139 lerdorf.com Linux 2.5 (sometimes 2.4) (4) Received: from ([204.11.219.139:41781] helo=lerdorf.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 26/AB-19715-514FB344 for ; Tue, 11 Apr 2006 14:23:17 -0400 Received: from [66.228.175.145] (borndress-lm.corp.yahoo.com [66.228.175.145]) (authenticated bits=0) by lerdorf.com (8.13.6/8.13.6/Debian-1) with ESMTP id k3BIND22006675; Tue, 11 Apr 2006 11:23:13 -0700 Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <43e2d0beeea44b0a7a5ab9a0fefc5fb5@gravitonic.com> Content-Transfer-Encoding: 7bit Cc: Ilia Alshanetsky Date: Tue, 11 Apr 2006 11:25:31 -0700 To: PHP Internals X-Mailer: Apple Mail (2.623) Subject: PCRE error handling patch From: andrei@gravitonic.com (Andrei Zmievski) I made a patch (against HEAD currently only) that makes it possible to set runtime limits on backtracking and recursion. It also implements preg_last_error() that lets users check whether there was an execution error (such as limit exceeded or bad UTF-8 or whatever). Ilia, do you think it might make it into 5.1.3? http://www.php.net/~andrei/pcre.diff -Andrei