note 106571 added to class.invalidargumentexception

From: Date: Sat, 19 Nov 2011 17:53:22 +0000
Subject: note 106571 added to class.invalidargumentexception
Groups: php.notes 
Request: Send a blank email to php-notes+get-184574@lists.php.net to get a copy of this message
Note that Joey's code showing an example of using InvalidArgumentException uses is_int, but probably should use filter_var($int, FILTER_VALIDATE_INT). Also, whether you should throw this function or OutOfRangeException when dealing with arrays is a bit unclear. My personal preference is to throw InvalidArgumentException. ---- Server IP: 69.147.83.197 Probable Submitter: 69.169.143.136 ---- Manual Page -- http://www.php.net/manual/en/class.invalidargumentexception.php Edit -- https://master.php.net/note/edit/106571 Del: integrated -- https://master.php.net/note/delete/106571/integrated Del: useless -- https://master.php.net/note/delete/106571/useless Del: bad code -- https://master.php.net/note/delete/106571/bad+code Del: spam -- https://master.php.net/note/delete/106571/spam Del: non-english -- https://master.php.net/note/delete/106571/non-english Del: in docs -- https://master.php.net/note/delete/106571/in+docs Del: other reasons-- https://master.php.net/note/delete/106571 Reject -- https://master.php.net/note/reject/106571 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#184574) next »