Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86533 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47338 invoked from network); 10 Jun 2015 01:20:33 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jun 2015 01:20:33 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.42 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.213.42 mail-yh0-f42.google.com Received: from [209.85.213.42] ([209.85.213.42:33544] helo=mail-yh0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/10-46536-FD097755 for ; Tue, 09 Jun 2015 21:20:32 -0400 Received: by yhpn97 with SMTP id n97so14577129yhp.0 for ; Tue, 09 Jun 2015 18:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=LpLgHdn+weSxMmHoaqMVxpoIg8NI1+0OontnnW3CQMc=; b=ECTK39qAghTQjZughjTNa659yaMudx8V5WOxHO/rEfzX6vVPHFgM0W6KKV/2Zwnt/q PVm0VWKVYi1egP0Oi12u2Gcz4mtzV3Uq69kez94b7mfaKNy9eayO301lzzxcDn3BZs2L dniMO/7X1lYRXr0Ze0bxi3dIR7aNhLM8VM2y51iZT3t1r8KyjP0UE7ke0sxp+axQ15yc aREpVHNPUlrI5ueupfbQjntvg6p7iaKUXVcUjXu+M8WicU50ePQ1yj9PZ6tb6vI78GPo MrOp8dhunjxxny+K2YdlwUbx6cfjhHlvmhMwQ2/LwIyOHNig0gUUEf6AL7qn/j+nUQYe yODw== X-Received: by 10.170.121.137 with SMTP id n131mr713707ykb.64.1433899228747; Tue, 09 Jun 2015 18:20:28 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.13.246.2 with HTTP; Tue, 9 Jun 2015 18:19:48 -0700 (PDT) In-Reply-To: <556363D3.1040902@gmail.com> References: <971AB39D-1E20-43E8-9CF1-A7F67E3C14C3@icicle.io> <556363D3.1040902@gmail.com> Date: Wed, 10 Jun 2015 10:19:48 +0900 X-Google-Sender-Auth: V7vwLyQ_llFwBfsqAxWX1he2cdU Message-ID: To: Rowan Collins Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=001a1137b2502c5e3205181fae19 Subject: Re: [PHP-DEV] [RFC] Throwable Interface From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1137b2502c5e3205181fae19 Content-Type: text/plain; charset=UTF-8 Hi all, On Tue, May 26, 2015 at 3:02 AM, Rowan Collins wrote: > On 24/05/2015 22:32, Yasuo Ohgaki wrote: > >> Does this include internal function type errors? >> e.g. >> >> $ php -r 'var_dump(mt_srand("99999999999999999999999999999999999"));' >> PHP Warning: mt_srand() expects parameter 1 to be integer, string given >> in >> Command line code on line 1 >> NULL >> >> If not, please make these exceptions rather than E_WARNING. >> We need consistency here. >> > > Changing a Warning to an Exception is a much bigger deal than changing an > Error to an Exception. While an Exception *can* be caught, the fundamental > nature of it is that it is *fatal* if it is not caught. So you would be > changing an advisory warning to a fatal error. > > There might be cases where this would be sensible, but this has nothing to > do with a) changing Errors to Exceptions (which has already passed) or b) > changing the hierarchy to add a Throwable interface (the subject of this > thread). Error and unhandled exception differs a lot. I agree. Personally, I don't mind at all if internal function raises exception for type errors, but others may be disturbed a lot probably. We need a roadmap to clean this mess up. How about add - Change internal function type error to exception by PHP 7.1 (or PHP 7.2 if a year is not enough) to the RFC for smoother migration and future consistency? Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1137b2502c5e3205181fae19--