PHP 7引入了一个新函数 intdiv(),它对其操作数执行整数除法,并将除法返回为int.
<?php $value = intdiv(10,3); var_dump($value); print(" "); print($value); ?>
它产生以下浏览器输出 :
int(3 ) 3