public static function isValidFieldOccurrence ($arg) 
    {
        if ($arg === null || ctype_digit($arg)) {
            $arg = (int)$arg;
        }
        return is_int($arg) && $arg >= 0 && $arg < 100;
    }
public static function isValidFieldOccurrence ($arg) 
    {
        if ($arg === null || ctype_digit($arg)) {
            $arg = (int)$arg;
        }
        return is_int($arg) && $arg >= 0 && $arg < 100;
    }
public static function isValidFieldOccurrence ( $ arg ) { if ( $ arg === null || ctype_digit ( $ arg ) ) { $ arg = ( int ) $ arg ; } return is_int ( $ arg ) && $ arg >= 0 && $ arg < 100 ; }
Return TRUE if argument is a valid field occurrence.

Argument is casted to int iff it is either null or a numeric string.

@param  mixed $arg Variable to check
@return boolean TRUE if argument is a valid field occurrence
Return TRUE if argument is a valid field occurrence .