- Trending Categories
- 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
Malhar Lathkar has Published 155 Articles
Malhar Lathkar
271 Views
Definition and UsageThe srand() function is used to seed the random number generaror. Seeding initializes the random number generator. Most random number generators need initial seeding. In PHP, use of srand() function is optional as it is done automatically.This function doen't have any return value.Syntaxsrand ([ int $seed ] ) ... Read More
Malhar Lathkar
2K+ Views
Definition and UsageThe sqrt() function returns square root of a positive float number. Since square root for negative number is not defined, it returns NAN. This is one of the most commonly used functions.This function always returns a floating point number.Syntaxsqrt ( float $arg ) : floatParametersSr.NoParameter & Description1arga number ... Read More
Malhar Lathkar
64 Views
Definition and UsageThe sinh() function calculates hyperbolic sine of given angle in radians. A hyperbolic sine function is defined assinh(x) = (ex – e-x))/2This function returns a float value between Π and -Π.Syntaxsinh( float $arg ) : floatParametersSr.NoParameter & Description1argA floating point value that represents angle in radiansReturn ValuesPHP sinh() ... Read More
Malhar Lathkar
170 Views
Definition and UsageThe sin() function returns the sine ratio of given angle in radians. In trigonometry, sine of an angle is defined as ratio of lengths of opposite side and hypotenuse.sin(x) = opposite/hypotenuseIf x=90 degree, sin(x) = 1 as opposite side of right angle is a hypotenuseThis function returns a ... Read More
Malhar Lathkar
774 Views
Definition and UsageThe round() function proves useful in rounding any floating point number upto a desired precision level. Positive precision parameter causes the number to be rounded after decimal point, whereas with negative precision, rounding occurs before decimal point. Precision is 0 by default.For example, round(10.6) returns 11, round(10.2) returns ... Read More
Malhar Lathkar
119 Views
Definition and UsageMost trigonometric functions like sin, cos, tan etc require angle argument in radians. Whereas, in practice angle is represented in degrees. The rad2deg() function proves useful in conversion of radian angle to degrees.This function returns a float number such that number=rad2deg(x) where x is angle in radians. angle ... Read More
Malhar Lathkar
734 Views
Definition and UsageThe pow () function is used to compute power of a certain number. It returns xy calculation, also termed as x raised to y. PHP also provides "**" asexponentiation operator.So, pow(x, y) returns xy which is same as x**ySyntaxpow ( number $base , number $exp ) : numberParametersSr.NoParameter & Description1baseThe ... Read More
Malhar Lathkar
332 Views
Definition and UsageThe pi () function returns the value of mathematical constant Π. It returns a float value 3.14159265359 which is equal to predefined constant defined in PHP - M_PISyntaxpi ( void ) : floatParametersThis function requires no parametersReturn ValuesPHP pi() function returnsthe mathematical constant Π and is equal to predefined mathematical ... Read More
Malhar Lathkar
316 Views
Definition and UsageThe 'mt' prefix in function's name stands for Mersenne Twister. The mt_rand() function returns an integer using Mersenne Twister Random Number Generator method. This function is a drop-in replacement for PHP's rand() function. default range is between 0 and platform specific mt_getrandmax(). On 64 bit Windows OS, it ... Read More
Malhar Lathkar
60 Views
Definition and UsageThe octdec() function is used to convert an octal number to decimal number equivalent. The function takes a string with octal representation as argument and retuns an integer.For example octdec('10') returns 8.Syntaxoctdec ( string $octal_string ) : numberParametersSr.NoParameter & Description1octal_stringA string containing the octal number to be convertedReturn ... Read More