public function rule_len($a) { if (!is_string($a)) { return $this->fail('must be a string'); } $this->prefix = 'length of '; return strlen($a); }