src/Budkit/Validation/Sanitize.php
public function word($data, $default = '', $options = [])
    {

        //First word in a sanitized string
        $sentence = $this->string($data, $default, $options, false);

        //@TODO validate string before breaking into words;
        //Requires php5.3!!
        return (string)strstr($sentence, ' ', true);
    }
public function word($data, $default = '', $options = [])
    {

        //First word in a sanitized string
        $sentence = $this->string($data, $default, $options, false);

        //@TODO validate string before breaking into words;
        //Requires php5.3!!
        return (string)strstr($sentence, ' ', true);
    }
public function word ( $ data , $ default = '' , $ options = [ ] ) { //First word in a sanitized string $ sentence = $ this -> string ( $ data , $ default , $ options , false ) ; //@TODO validate string before breaking into words; //Requires php5.3!! return ( string ) strstr ( $ sentence , ' ' , true ) ; }
Returns the first word a sanitised string
Strip tags, optionally strip or encode special characters.

@param string $name
@param string $verb
@param array $flags
Returns the first word a sanitised string Strip tags optionally strip or encode special characters .