note 89032 added to function.ctype-digit

From: Date: Wed, 18 Feb 2009 20:24:06 +0000
Subject: note 89032 added to function.ctype-digit
Groups: php.notes 
Request: Send a blank email to php-notes+get-150821@lists.php.net to get a copy of this message
This function seems to include a hidden "feature", if an integer is sent, and is less that 256, it is treated as an ASCII value. This will confuse the hell out of you. Try this: <? for ($a = 0; $a < 255; $a++) if (ctype_digit($a)) echo $a . ' ' . chr($a) . "\n"; ?> ---- Server IP: 217.160.72.57 Probable Submitter: 66.195.65.250 ---- Manual Page -- http://www.php.net/manual/en/function.ctype-digit.php Edit -- https://master.php.net/note/edit/89032 Del: integrated -- https://master.php.net/note/delete/89032/integrated Del: useless -- https://master.php.net/note/delete/89032/useless Del: bad code -- https://master.php.net/note/delete/89032/bad+code Del: spam -- https://master.php.net/note/delete/89032/spam Del: non-english -- https://master.php.net/note/delete/89032/non-english Del: in docs -- https://master.php.net/note/delete/89032/in+docs Del: other reasons-- https://master.php.net/note/delete/89032 Reject -- https://master.php.net/note/reject/89032 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#150821) next »