- 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
pow() function in PHP
The pow() function Returns a raised to the power of b.
Syntax
pow(a,b)
Parameters
a − The base
b − The exponent
Return
The pow() function Returns a raised to the power of b.
Example
<?php echo(pow(3,5) . "<br>"); ?>
Output
243<br>
Example
Let us see another example −
<?php echo(pow(-4,6) . "<br>"); echo(pow(-3,-9) . "<br>"); ?>
Output
4096<br>-5.0805263425291E-5<br>
Example
Let us see another example −
<?php echo(pow(-4,-5.3)); ?>
Output
NAN
Advertisements