Mike Willbanks wrote on 15/01/2015 16:55:
  It also means that then a library developer would
need to handle conditions on both sides (when in weak vs. strict).  So I
don't really understand where the gains of this would come from and it
actually causes me concern in that what if a developer forgets to define
strict and you're entire system is built on strict.

In case this hasn't been repeated enough times already: No They Would Not.

As a library developer, you do not rely on strict or weak hints, you rely on the variables you receive being of the types you require. This is guaranteed in both modes.

You cannot stop the user of your library doing whatever it takes to get past your validation. It is up to them to provide sane inputs to your published API, and no version of type hinting can change that.

Regards,
--
Rowan Collins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to