PHP fdiv() Function Last Updated : 28 Apr, 2025 Comments Improve Suggest changes Like Article Like Report The fdiv() is an inbuilt PHP function that returns the result of a division of 2 numbers(in accordance with IEEE 754). The NaN will never == or === for any value while doing the comparison, even including itself. Syntax: fdiv(float $num1, float $num2): floatParameters: This function accepts 2 parameters: num1: This parameter indicates the dividend or numerator.num2: This parameter indicates the divisor numberReturn Value: This function returns floating point values by dividing num1 / num2. The INF, -INF, or NAN will be returned if the second number is zero. Example 1:The following example demonstrates the fdiv() function. PHP <?php var_dump(fdiv(5.7,1.3)); var_dump(fdiv(3,2)) ; ?> Output: float(4.384615384615385) float(1.5) Example 2: The following example demonstrates the fdiv() function. PHP <?php var_dump(fdiv(10,2)); var_dump(fdiv(4,2)) ; ?> Output: float(5) float(2) Reference: https://www.php.net/manual/en/function.fdiv.php Create Quiz Comment N neeraj3304 Follow 0 Improve N neeraj3304 Follow 0 Improve Article Tags : PHP PHP-math PHP-function Explore BasicsPHP Syntax4 min readPHP Variables5 min readPHP | Functions6 min readPHP Loops4 min readArrayPHP Arrays5 min readPHP Associative Arrays4 min readMultidimensional arrays in PHP5 min readSorting Arrays in PHP4 min readOOPs & InterfacesPHP Classes2 min readPHP | Constructors and Destructors5 min readPHP Access Modifiers4 min readMultiple Inheritance in PHP4 min readMySQL DatabasePHP | MySQL Database Introduction4 min readPHP Database connection2 min readPHP | MySQL ( Creating Database )3 min readPHP | MySQL ( Creating Table )3 min readPHP AdvancePHP Superglobals6 min readPHP | Regular Expressions12 min readPHP Form Handling4 min readPHP File Handling4 min readPHP | Uploading File3 min readPHP Cookies9 min readPHP | Sessions7 min read Like