final public function ordinal(): int
    {
        if ($this->ordinal === null) {
            $ordinal = 0;
            foreach (self::getMembers() as $constValue) {
                if ($this->value === $constValue) {
                    break;
                }
                $ordinal++;
            }
            $this->ordinal = $ordinal;
        }

        return $this->ordinal;
    }
final public function ordinal(): int
    {
        if ($this->ordinal === null) {
            $ordinal = 0;
            foreach (self::getMembers() as $constValue) {
                if ($this->value === $constValue) {
                    break;
                }
                $ordinal++;
            }
            $this->ordinal = $ordinal;
        }

        return $this->ordinal;
    }
final public function ordinal ( ) : int { if ( $ this -> ordinal === null ) { $ ordinal = 0 ; foreach ( self :: getMembers ( ) as $ constValue ) { if ( $ this -> value === $ constValue ) { break ; } $ ordinal ++ ; } $ this -> ordinal = $ ordinal ; } return $ this -> ordinal ; }
Retrieves the enum ordinal position

@return int
Retrieves the enum ordinal position