note 113530 added to function.is-string

From: Date: Fri, 25 Oct 2013 22:06:47 +0000
Subject: note 113530 added to function.is-string
Groups: php.notes 
Request: Send a blank email to php-notes+get-197323@lists.php.net to get a copy of this message
You can use this code for checking if there are not strings in some args... <?php function is_string_r( $args ) { $args = func_get_args(); foreach($args as $a) { if( ! is_string($a) ) return false; } return true; } if( is_string_r('foo', 'some', 1) ) echo 'All args passed are strings'; else echo 'One of the args is not a string'; ?> ---- Server IP: 72.52.91.12 Probable Submitter: 72.52.91.12 ---- Manual Page -- http://php.net/manual/en/function.is-string.php Edit -- https://master.php.net/note/edit/113530 Del: integrated -- https://master.php.net/note/delete/113530/integrated Del: useless -- https://master.php.net/note/delete/113530/useless Del: bad code -- https://master.php.net/note/delete/113530/bad+code Del: spam -- https://master.php.net/note/delete/113530/spam Del: non-english -- https://master.php.net/note/delete/113530/non-english Del: in docs -- https://master.php.net/note/delete/113530/in+docs Del: other reasons-- https://master.php.net/note/delete/113530 Reject -- https://master.php.net/note/reject/113530 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#197323) next »