fastest version to php <4.2:
<?php function is_infinite($v){$v=$v>>0;return -9e1000==$v||$v==9e1000;}; ?>
the $v=$v>>0; is just to ensure it is a number and its not mandatory.
effectively, the function can be reduced to:
<?php function is_infinite($v){return -9e1000==$v||$v==9e1000;}; ?>
this works because any number that is too big or too small for a float is considered to be infinite or -infinite.