note 76160 added to function.strlen

From: Date: Tue, 03 Jul 2007 14:12:57 +0000
Subject: note 76160 added to function.strlen
Groups: php.notes 
Request: Send a blank email to php-notes+get-128179@lists.php.net to get a copy of this message
The function "empty" tests whether a variable will evaluate as FALSE; the string '0' (as well as the number 0) does. Another simple way of testing for an empty string is: if($string=='') foo(); else bar(); This will match an empty string and anything that converts to it (such as NULL/unset variable), but not the number zero as either a number or a string. ---- Server IP: 147.32.160.17 Probable Submitter: 86.49.6.75 ---- Manual Page -- http://www.php.net/manual/en/function.strlen.php Edit -- https://master.php.net/note/edit/76160 Del: integrated -- https://master.php.net/note/delete/76160/integrated Del: useless -- https://master.php.net/note/delete/76160/useless Del: bad code -- https://master.php.net/note/delete/76160/bad+code Del: spam -- https://master.php.net/note/delete/76160/spam Del: non-english -- https://master.php.net/note/delete/76160/non-english Del: in docs -- https://master.php.net/note/delete/76160/in+docs Del: other reasons-- https://master.php.net/note/delete/76160 Reject -- https://master.php.net/note/reject/76160 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128179) next »