#42426 [Opn]: ctype_alnum fails on integers

From: Date: Sat, 25 Aug 2007 16:55:43 +0000
Subject: #42426 [Opn]: ctype_alnum fails on integers
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-116664@lists.php.net to get a copy of this message
ID: 42426 User updated by: phpbugs dot 20 dot zsh at spamgourmet dot com Reported By: phpbugs dot 20 dot zsh at spamgourmet dot com Status: Open Bug Type: Unknown/Other Function Operating System: Irrelevant PHP Version: 5.2.3 New Comment: Oops, the reproduce code should be: <?php $var = 42; var_dump(ctype_alnum($var), ctype_alnum("$var")); ?> Previous Comments: ------------------------------------------------------------------------ [2007-08-25 16:50:46] phpbugs dot 20 dot zsh at spamgourmet dot com Description: ------------ ctype_alnum returns false if an integer is passed. Reproduce code: --------------- <?php $var = 42; var_dump($var, "$var"); ?> Expected result: ---------------- bool(true) bool(true) Actual result: -------------- bool(false) bool(true) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42426&edit=1

« previous php.bugs (#116664) next »