Add PHP version check to pass correct arguments to "htmlentities" function.