On 10 March 2017 15:11:39 GMT+00:00, Andrey Andreev <n...@devilix.net> wrote: >Let's say I asked for one of 3 class constants, that happen to hold >integer values, and you gave me a string that just happens to be >castable to one of those values - you obviously aren't using my API >correctly, but I have no way of telling you this because the compiled >hid it from both of us.
I actually nearly used that same example for the opposite point: you can't *ever* know if someone used those constants, and it has nothing to do with strict types. The only way typing would help you know that is if the language had native enums, and was strict about casting to those. Regards, -- Rowan Collins [IMSoP] -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php