- 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_scan1() function in PHP
The gmp_scan1() function scans “1” in the GMP number beginning from a particular index that you can set as a parameter.
Syntax
gmp_scan1(n,i)
Parameters
n − The GMP number to be passed.
i − The index from where the search begin.
Return
The gmp_scan1() function returns the index of the “1” bit. It is checked after the particular index.
Example
The following is an example −
<?php $val = gmp_init("01010001111", 2); echo gmp_scan1($val, 5); ?>
Output
The following is the output −
7
Advertisements