public function getWord($number) {
        if(is_numeric($number)) {
            $number = strval($number);
        }
        if(strlen($number) > 39){
            throw new InvalidArgumentException('Number max lenght 36 digit');
        }
        $formated = $this->number_format(strval($number), 0, '.', ',');
        $groups = explode(',', $formated);

        $steps = count($groups);

        $parts = array();
        foreach ($groups as $step => $group) {
            $group_words = $this->groupToWords($group);
            if ($group_words) {
                $part = implode(' ' . $this->number_word['and'] . ' ', $group_words);
            if (isset($this->number_word['step'][$steps - $step - 1])) {
                $part .= ' ' . $this->number_word['step'][$steps - $step - 1];
            }
                $parts[] = $part;
            }
        }
        return implode(' ' . $this->number_word['and'] . ' ', $parts);
	}
public function getWord($number) {
        if(is_numeric($number)) {
            $number = strval($number);
        }
        if(strlen($number) > 39){
            throw new InvalidArgumentException('Number max lenght 36 digit');
        }
        $formated = $this->number_format(strval($number), 0, '.', ',');
        $groups = explode(',', $formated);

        $steps = count($groups);

        $parts = array();
        foreach ($groups as $step => $group) {
            $group_words = $this->groupToWords($group);
            if ($group_words) {
                $part = implode(' ' . $this->number_word['and'] . ' ', $group_words);
            if (isset($this->number_word['step'][$steps - $step - 1])) {
                $part .= ' ' . $this->number_word['step'][$steps - $step - 1];
            }
                $parts[] = $part;
            }
        }
        return implode(' ' . $this->number_word['and'] . ' ', $parts);
	}
public function getWord ( $ number ) { if ( is_numeric ( $ number ) ) { $ number = strval ( $ number ) ; } if ( strlen ( $ number ) > 39 ) { throw new InvalidArgumentException ( 'Number max lenght 36 digit' ) ; } $ formated = $ this -> number_format ( strval ( $ number ) , 0 , '.' , ',' ) ; $ groups = explode ( ',' , $ formated ) ; $ steps = count ( $ groups ) ; $ parts = array ( ) ; foreach ( $ groups as $ step => $ group ) { $ group_words = $ this -> groupToWords ( $ group ) ; if ( $ group_words ) { $ part = implode ( ' ' . $ this -> number_word [ 'and' ] . ' ' , $ group_words ) ; if ( isset ( $ this -> number_word [ 'step' ] [ $ steps - $ step - 1 ] ) ) { $ part .= ' ' . $ this -> number_word [ 'step' ] [ $ steps - $ step - 1 ] ; } $ parts [ ] = $ part ; } } return implode ( ' ' . $ this -> number_word [ 'and' ] . ' ' , $ parts ) ; }
return string of number

@param string $number
@return string
return string of number