View Single Post
  #12 (permalink)  
Old 04-16-2008, 10:44 PM
Jeyaseelansarc Jeyaseelansarc is offline
D-Web Genius
 
Join Date: Mar 2007
Location: Chennai
Posts: 1,159
Jeyaseelansarc is on a distinguished road
Send a message via AIM to Jeyaseelansarc
Default Re: Mathematical functions in PHP

pow() returns base raised to the power of exp. If possible, this function will return an integer.

If the power cannot be computed, a warning will be issued, and pow() will return FALSE. Since PHP 4.2.0 pow() doesn't issue any warning.

And PHP cannot handle negative bases

Example:
PHP Code:
<?php

var_dump
(pow(28)); // int(256)
echo pow(-120); // 1
echo pow(00); // 1

echo pow(-15.5); // error

?>
__________________
With,
J. Jeyaseelan

Everything Possible
Reply With Quote