php cast type conversion

WBOY
Release: 2016-07-25 08:45:58
Original
2012 people have browsed it

Forced type conversion in PHP generally occurs in environments where arithmetic operators are involved. Arithmetic operators are relatively common numeric operators. The content being manipulated is generally called the operand or operand.

Arithmetic operators are typically used on data of type integer or double (also known as floating point or real). If there are strings in the objects involved in arithmetic operations, PHP will try to convert these strings into a number. If it contains the "e" or "E" character, it is treated as scientific notation and converted to a floating point number, otherwise it is converted to an integer.

php will look for numbers at the beginning of the string and use those numbers as the value of the string. If no number is found, the value of the string will be 0.

php


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!