- 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_com() function in PHP
The gmp_com() function computes the one’s complement of a GMP number.
Syntax
gmp_com($val)
Parameters
val − The GMP number. It can be GMP object in PHP version 5.6 and later. Can also be numeric strings.
Return
The gmp_com() function returns the one’s complement of a GMP number. The output is itself a GMP number.
Example
The following is an example −
<?php $val = "121"; $a = gmp_com($val); echo $a; ?>
Output
The following is the output −
-122
Advertisements