Enforcing contracts in your PHP functions and methods(j.mp)
j.mp
Enforcing contracts in your PHP functions and methods
http://j.mp/GM40us
Design by contract is an important concept for controlling what type of input your methods or functions can receive. One of the most dangerous features of PHP is that functions will still execute even when they are missing required arguments, by emitting a warning instead of an error. In this post, I am going to walk through some of the solutions available to deal with this problem.
0 comments
—