- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
gmp_intval() function in PHP
The gmp_intval() function returns the integer value of a variable.
Syntax
intval ( $var, $base )
Parameters
var − The variable which needs to be converted to its integer value.
base − The base for conversion of $var to its corresponding integer.
Return
The gmp_intval() function returns the integer value for var.
Example
The following is an example −
<?php $var = "180"; echo intval($var, 8); ?>
Output
The following is the output −
1
Advertisements