Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87225 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23347 invoked from network); 21 Jul 2015 17:45:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Jul 2015 17:45:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.172 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.172 mail-wi0-f172.google.com Received: from [209.85.212.172] ([209.85.212.172:35227] helo=mail-wi0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 80/60-20623-9458EA55 for ; Tue, 21 Jul 2015 13:45:45 -0400 Received: by wibxm9 with SMTP id xm9so129096446wib.0 for ; Tue, 21 Jul 2015 10:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=YGETwvV4i0/UDaUKkjwlDwbg1zcWAz/XrhgN4wu1aYg=; b=JIuUroCefteuP89RRhZAlGsIyLDvIujW9AY99teS7xF+qIOuwdtVdDUfdxvhk2HvWb GQ6U7kLezWY5mNduEYV2bW1cZVQAk+t5lAaJTVSTKtTuovC2OwNOOfpzI4S14uVa2KeC qTeGmp9BolKViTlvCqPl7thvtEHYstfJzaswiqNwhCRtDvSlRGaWxzzHNS16/b8snWE0 HBbPoR17HTGyvlWqWTbnLI2wDSYSTHxfvycBPx0Fud5BGi7t8cQVOVfNQYeFUNc/nn8U BD+70ydoaPi8yIi4QIQg7fyig2rSReWjgqq5DH4woUtbzXrtr7hV1+v0xNZ0Kfx8ccel X0lA== X-Received: by 10.180.149.206 with SMTP id uc14mr35202720wib.12.1437500741671; Tue, 21 Jul 2015 10:45:41 -0700 (PDT) Received: from [192.168.0.136] ([62.189.198.114]) by smtp.googlemail.com with ESMTPSA id b13sm17890413wic.15.2015.07.21.10.45.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jul 2015 10:45:40 -0700 (PDT) To: internals@lists.php.net References: Message-ID: <55AE8515.7050905@gmail.com> Date: Tue, 21 Jul 2015 18:44:53 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] List of possible E_RECOVERABLE_ERRORs From: rowan.collins@gmail.com (Rowan Collins) Michael Morris wrote on 21/07/2015 18:11: > Hi. I hate to ask an outright question on the list rather but I've been > searching the last 5 hours for an answer to this and haven't found anything > and it's a rather tight corner case. I'm working on a small package for PHP > 5.x that uses set_error_handler() to convert E_RECOVERABLE_ERRORs to the > appropriate PHP 7 exceptions. I know I can't emulate things exactly - my > goal is to get things so that PHPUnit tests can use the same > @expectedException annotation for these scenarios, simplifying unit test > writing. > > As far as my research has found E_RECOVERABLE_ERROR has only ever been used > for type hint failures. Are there any other errors that have this type, > and if so to what PHP 7 exception should they be converted? > You should be able to figure out with a grep of the source code for use of that constant (it has the same name in C as in PHP). A quick glance on lxr.php.net shows a few other uses: http://lxr.php.net/search?q=&defs=&refs=E_RECOVERABLE_ERROR&path=&hist=&project=PHP_5_6 Regards, -- Rowan Collins [IMSoP]