PHP MATHS [ Power function]

Started on the old forum in August 2011 · view the original in the archive · old links redirect here

#php-maths #php-tutorials #tutorials

No replies · 520 views · started 15 years ago · 1 min read

razzbee Developer · 130 posts #1

9 power can be expressed as :

<?
echo pow(19, 5);

?>

Random numbers can be done this way

echo rand();  //this method is slow

echo mt_rand(); //this method is faster 4 times than the above one

Ronding floating points numbers to any significant digits

echo round("20.937353",2);
//we rounded the floating number to 2 significants digits

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close