- Trending Categories
- 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_and() function in PHP
The gmp_and() function computes the bitwise AND of two GMP numbers.
Syntax
gmp_and($n1, $n2)
Parameters
n1 − The first GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.
n2 − The second GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.
Return
The gmp_and() function returns the result as a GMP number.
Example
The following is an example −
<?php $n1 = "12"; $n2 = "25"; $a = gmp_and($n1, $n2); echo $a; ?>
Output
The following is the output −
8
Advertisements