Divide integer and get integer value

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)