超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<is_nullis_object>
Last updated: Fri, 22 Jun 2007

is_numeric

(PHP 4 , PHP 5)

is_numeric --  检测变量是否为数字或数字字符串

描述

bool is_numeric ( mixed var)

如果 var 是数字和数字字符串则返回 TRUE,否则返回 FALSE

参见 is_bool()is_float()is_int()is_string()is_object()is_array()is_integer()




add a note add a note User Contributed Notes
is_numeric
zak at php dot net
19-Nov-2000 08:13
If you are testing a string with is_numeric(), the string must not contain *any* non-numeric data.  If it does, is_numeric() will return false.

For example:

is_numeric ("1.21E-100"); // Returns true

is_numeric ("19 Nov 00"); // Returns false

<is_nullis_object>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22