php man page for intdiv

Query: intdiv

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

INTDIV(3)								 1								 INTDIV(3)

intdiv - Integer division

SYNOPSIS
integer intdiv (integer $numerator, integer $divisor)
DESCRIPTION
Returns the integer division of $numerator by $divisor.
PARAMETERS
o $numerator - Number to be divide. o $divisor - Number which divides the $numerator
RETURN VALUES
The integer division of $numerator by $divisor. If $divisor is zero, it throws an E_WARNING and returns FALSE. If the $numerator is LONG_MIN (- PHP_INT_MAX - 1) and the $divisor is -1, it returns zero.
EXAMPLES
Example #1 intdiv(3) example <?php var_dump(intdiv(3, 2)); var_dump(intdiv(-3, 2)); var_dump(intdiv(3, -2)); var_dump(intdiv(-3, -2)); var_dump(intdiv(PHP_INT_MAX, PHP_INT_MAX)); var_dump(intdiv(-PHP_INT_MAX - 1, -PHP_INT_MAX - 1)); var_dump(intdiv(-PHP_INT_MAX - 1, -1)); var_dump(intdiv(1, 0)); ?> int(1) int(-1) int(-1) int(1) int(1) int(1) int(0) Warning: intdiv(): Division by zero in %s on line 9 bool(false) PHP Documentation Group INTDIV(3)
Related Man Pages
property_exists(3) - php
splobjectstorage(3) - php
intdiv(3) - php
is_float(3) - php
reflectionclass.getshortname(3) - php
Similar Topics in the Unix Linux Community
division problem
Each team in the division of the other three teams twice
awk: division by zero
variables division with awk