Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
AJAX
VB.NET
SQL Query
UDDI
CLASS
JavaScript Questions
SharePoint Interview
SilverLight
WCF
general knowledge
 ASP.NET
 :) Hot Jobs
 
 :) Latest Articles


  

 


Common PHP function with code
Question Posted on 23 Mar 2019

Home >> PHP >> Example >> Common PHP function with code




Common PHP function with code
Below are the diferent PHP function with example and output
(1)is_number
it is used to check value is numeric or not
Code:-
< ?php
if(is_numeric("crackyourinterview"))
{
echo "true";
}
else
{
echo "false";
}
?>
Output:-False

(2)number_format
used to separate digit and decimal parts
Code
< ?php
echo number_format(1124563);
? >
Output:-1,124,563

(3)rand
Used to generate a random number
Code:-
< ?php
echo rand();
?>
Output:- Random Number

(4)round
Round off a number with decimal points to nearest whole number
Code:-
< ?php
echo round(56.23);
?>
Output:-56

(5)sqrt
Return the square root of a number
Code:-
< ?php
echo sqrt(81);
?>
Output:-9

(5)cos
Return the cosine
Code:-
echo cos(45);
?>
Output:-0.52532198881773

(6)sin
Return the sine
Code:-
< ?php
echo sin(45);
?>
Output:-0.85090352453412

(7)tab
Return the tangent
Code:-
< ?php
echo tan(45);
?>
Output:-1.6197751905439

(8)pi
Returns the value of PI
Code:-
< ?php
echo pi();
?>
Output:-3.1415926535898
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
something about array creation sorting searching in php
Remove whitespace from end of string in PHP
difference between htmlentities() and htmlspecialchars()
How to gernate random value in PHP
Number of time a value occur in array in PHP






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |