java软件工程师学php - 4. gettype()/settype()

WBOY
Release: 2016-06-13 13:11:00
Original
1084 people have browsed it

java程序员学php - 4. gettype()/settype()
1.gettype()拿到数据类型
  比如 gettype(345); //返回"integer"
      gettype(some_object);// 返回"object"
  另有一些快捷的类型查询函数,如 is_double(), is_array(), is_string()等

2.settype()则强行改变数据的类型
   settype($a, 'double');

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!