How to pow in PHP

This article describe about pow() Function in PHP.
  • 1334

pow() Function

This function has the two arguments, first argument raises to the power of the second argument, and return the result.

Syntax

pow( x, y)

 

Parameter Description
x Specified a number to raise.
y Specified power to which raise the number

Example

<html>
<body>
<?php
echo pow(5,2) . "<br />";
echo pow(6,3) . "<br />";
echo pow(-7,2) . "<br />";
echo pow(-7,-2) . "<br />";
echo pow(-6,5.5);
?>
</body>
</html>

 

Output


pow-php.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.