Re: [RFC] Throwable Interface

From: Date: Mon, 25 May 2015 18:02:59 +0000
Subject: Re: [RFC] Throwable Interface
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-86385@lists.php.net to get a copy of this message
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). Regards, -- Rowan Collins [IMSoP]

« previous php.internals (#86385) next »