Poka-yoke and PHP
PHP's Marco Tabini has written an interesting article about applying the poka-yoke to PHP code in this months php|architect magazine.
Poka-yoke limits your options to the point where only one choice – the correct one – is possible.
In his example code which is provided, he shows that for example when filtering $_GET and $_POST developers should not be able to just go and set more entries into superglobals like $_GET['foo'] = 'bar'; as well as showing how to only return data via Filter::raw($key) and Filter::html($key) which returns the raw value to the requested key.