HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
PHP Variable Handling Reference : Return the integer value of different variables
The intval() function returns the integer value of a variable.
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
base | Optional. Specifies the base to use for the conversion. Only has effect if variable is a string. Default base is 10 |
Return Value: | The integer value of the variable on success, 0 on failure. An empty array will return 0, and a non-empty array will return 1 |
---|---|
Return Type: | Integer |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.1: When an object is passed to variable, it throws E_NOTICE and returns 1 |
❮ PHP Variable Handling Reference