PHP intdiv()関数
例
いくつかの整数除算を実行します。
<?php
echo
intdiv(8, 4) . "<br>";
echo intdiv(5, 2) . "<br>";
echo intdiv(-5, -2);
?>
定義と使用法
intdiv()関数は、整数の除算に使用されます。
構文
intdiv(dividend, divisor);
パラメータ値
Parameter | Description |
---|---|
dividend | Required. Specifies a number that will be divided |
divisor | Required. Specifies the number to divide the dividend by |
技術的な詳細
戻り値: | 除算の整数部分 |
---|---|
返品タイプ: | 整数 |
PHPバージョン: | 7歳以上 |
❮PHP数学リファレンス