Re: [RFC][DISCUSSION] - Throwables error code's type generalization

From: Date: Sun, 18 Dec 2016 11:03:39 +0000
Subject: Re: [RFC][DISCUSSION] - Throwables error code's type generalization
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-97438@lists.php.net to get a copy of this message
Will be nice to have regardless if PHP gets stuff like enums. It's not just a dirty fix. Strictly speaking it is not a BC change because int is not actually enforced at all. Also this would be a problem in other languages... function bar(): int{ mixed $code = (new MyException)->getCode(); return $code; } ...but in PHP, as long MyException->getCode() continues to return int, there would be no actual BC break. But if you think it'll be necessary I'll require 2/3 of the votes. \o

« previous php.internals (#97438) next »