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