As of PHP 7, we can use the intdiv built-in function to get an integer value:
intdiv(8,3); // 2
For earlier versions of PHP, we can use the round() function to get an integer rounded value:
round(8 / 3); // 3
Or we can use the floor() function to get an integer value:
floor(8 / 3); // 2