Safcode Institute by Sir Safder





  • Math Functions

    Math's function in PHP that allows you to perform math's task.
    Some functions are as follows:
    1) Base_convert() = its allows you to convert base number in any
    base numbers and hexadecimal number, binary number, octal
    number etc.
    
    2) Pi() = pi functions returns a PI values.
    Example: echo (PI()); 
    //output: 3.1415
    
    3) Max() = max function returns a highest value in the data.
    Example: echo (max(20, 32, -93, 35)); 
    //output: 35
    
    4) MIN() = min function returns a lower value in the data.
    Example: echo (min(20, 32, -93, 35)); 
    //output: -93
    
    5) Abs() = abs function returns a positive numbers of the value.
    Example: echo (abs(-10.5)); 
    //output: 10.5
    
    6) Sqrt() = sqrt function returns a square root of the numbers.
    Example: echo (sqrt(25)); 
    //output: 5
    
    7) Round() = round function returns a floating points numbers.
    Example: echo (round(0.70)); 
    //output: 1
    
    8) Rand() = random function generate any randomly numbers.
    Example: echo (rand()); 
    //output: 7278382



  • You Can Also Watch Our Tutorial