Is there any particular difference between intval and casting to int – `(int) X`?

intval() can be passed a base from which to convert. (int) cannot.

int intval( mixed $var  [, int $base = 10  ] )

Leave a Comment