Design by contract for PHP 5.3+