My hosting company has PHP4 as the default, with PHP5 available by extension (.php5).
It is understandable that shared servers may not be upgraded, because many PHP4 applications won't run under PHP5.
Instead of filter_var, you should be able to find some code to validate the IP address.