here are two available ways in PHP for converting float value into integer, in which first is the intval() function and (int).
Float value can be converted into an integer by using Python’s built-in function int(). It converts the first argument’s data type into an integer.
You can use Python’s built-in int() function to convert the string into an integer. It accepts two parameters which first is required and the second is optional.
A string value can be converted into an integer value through type casting or intval() function in PHP.