Home > Backend Development > PHP Problem > What does doubleval mean in php?

What does doubleval mean in php?

(*-*)浩
Release: 2023-02-23 17:04:02
Original
3753 people have browsed it

What does doubleval mean in php?

PHP doubleval() function

Definition and usage (recommended learning: PHP video tutorial)

doubleval is an alias of floatval() function

Syntax

This function is an alias of floatval().

Note:

This alias is a legacy issue after the function was renamed. In older versions of PHP, there is no floatval() function, so you may need to use this floatval() alias function. Definition and usage

floatval function, obtains the floating point value of the variable

Syntax

float floatval ( mixed $var )<br/>
Copy after login

Returns the float value of the variable var .

Parameter description

var, var can be any scalar type. You cannot use floatval() with arrays or objects.

<?php<br/>$var = &#39;122.34343The&#39;;<br/>$float_value_of_var = floatval ($var);<br/>print $float_value_of_var; // 打印出 122.34343<br/>?><br/>
Copy after login

The above is the detailed content of What does doubleval mean in php?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
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