Re: [RFC] Return type-hint

From: Date: Thu, 28 Apr 2011 08:31:16 +0000
Subject: Re: [RFC] Return type-hint
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-52045@lists.php.net to get a copy of this message
Am 28.04.2011 10:23, schrieb Stas Malyshev: > But why would I want to see these errors? > How they would make anything easier or better? to find problems before your users? i do not know what you want, but i want with "error_reporting = E_ALL | E_STRICT" get noticed if something possible is unclean it is the same as for functions - so what is the difference between the following? the first one can get a empty string and will not notice you and ignore the foreach the second one will produce an error if empty string is given while an empty array would be accepted function bla($arr) { if(!empty($arr)) { foreach($arr) { } } } function bla(array $arr) { if(!empty($arr)) { foreach($arr) { } } }

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.internals (#52045) next »