public function smogIndex($strText = false)
    {
        $strText = $this->setText($strText);

        $score = Maths::bcCalc(
            1.043,
            '*',
            Maths::bcCalc(
                Maths::bcCalc(
                    Maths::bcCalc(
                        Syllables::wordsWithThreeSyllables($strText, true, $this->strEncoding),
                        '*',
                        Maths::bcCalc(
                            30,
                            '/',
                            Text::sentenceCount($strText, $this->strEncoding)
                        )
                    ),
                    'sqrt',
                    0
                ),
                '+',
                3.1291
            )
        );

        if ($this->normalise) {
            return Maths::normaliseScore($score, 0, $this->maxGradeLevel, $this->dps);
        } else {
            return Maths::bcCalc($score, '+', 0, true, $this->dps);
        }
    }
public function smogIndex($strText = false)
    {
        $strText = $this->setText($strText);

        $score = Maths::bcCalc(
            1.043,
            '*',
            Maths::bcCalc(
                Maths::bcCalc(
                    Maths::bcCalc(
                        Syllables::wordsWithThreeSyllables($strText, true, $this->strEncoding),
                        '*',
                        Maths::bcCalc(
                            30,
                            '/',
                            Text::sentenceCount($strText, $this->strEncoding)
                        )
                    ),
                    'sqrt',
                    0
                ),
                '+',
                3.1291
            )
        );

        if ($this->normalise) {
            return Maths::normaliseScore($score, 0, $this->maxGradeLevel, $this->dps);
        } else {
            return Maths::bcCalc($score, '+', 0, true, $this->dps);
        }
    }
public function smogIndex ( $ strText = false ) { $ strText = $ this -> setText ( $ strText ) ; $ score = Maths :: bcCalc ( 1.043 , '*' , Maths :: bcCalc ( Maths :: bcCalc ( Maths :: bcCalc ( Syllables :: wordsWithThreeSyllables ( $ strText , true , $ this -> strEncoding ) , '*' , Maths :: bcCalc ( 30 , '/' , Text :: sentenceCount ( $ strText , $ this -> strEncoding ) ) ) , 'sqrt' , 0 ) , '+' , 3.1291 ) ) ; if ( $ this -> normalise ) { return Maths :: normaliseScore ( $ score , 0 , $ this -> maxGradeLevel , $ this -> dps ) ; } else { return Maths :: bcCalc ( $ score , '+' , 0 , true , $ this -> dps ) ; } }
Gives the SMOG Index of text entered rounded to one digit
@param   boolean|string  $strText         Text to be checked
@return  int|float
Gives the SMOG Index of text entered rounded to one digit