PHP的几个常用数字判断函数代码,主要包括双精度,整数,字符判断等。
<HTML> <HEAD> <TITLE>常用的数值判断函数</TITLE> </HEAD> <BODY> <? //判断数组 $colors = array("red", "blue", "green"); if(is_array($colors)) { print("colors is an array"."<br>"); } //双精度数判断 $Temperature = 15.23; if(is_double($Temperature)) { print("Temperature is a double"."<br>"); } //整数判断 $PageCount = 2234; if(is_integer($PageCount)) { print("$PageCount is an integer"."<br>"); } //对象判断 class widget { var $name; var $length; } $thing = new widget; if(is_object($thing)) { print("thing is an object"."<br>"); } //字符判断 $Greeting = "Hello"; if(is_string($Greeting)) { print("Greeting is a string"."<br>"); } ?> </BODY> </HTML>
您可能感兴趣的文章
- PHP将阿拉伯数字转化为汉字的函数
- PHP 生成连续的数字(字母)数组函数range()分析,PHP抽奖程序函数
- PHP常用的判断变量的函数
- php最精确的字符串长度截取函数
- php获取汉字拼音首字母的函数(真正可以使用的)
- php判断函数,类,类方法是否存在
- php判断来访蜘蛛信息的函数
- php读取目录并列表显示目录中的文件的函数
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article
Assassin's Creed Shadows: Seashell Riddle Solution
3 weeks agoByDDD
What's New in Windows 11 KB5054979 & How to Fix Update Issues
2 weeks agoByDDD
Where to find the Crane Control Keycard in Atomfall
3 weeks agoByDDD
Saving in R.E.P.O. Explained (And Save Files)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Dreamweaver Mac version
Visual web development tools

WebStorm Mac version
Useful JavaScript development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment