Home »
MCQs »
PHP MCQs
Which is the correct syntax to cast float to integer?
65. Which is the correct syntax to cast float to integer?
- (int) float_variable
- int (float_variable)
- (int) (float_variable)
- All of the above
Answer: A) (int) float_variable
Explanation:
The correct syntax to cast float to integer is:
(int) float_variable