/s', '//s' ]; $filterDataPost = [ '/[\s]{2,}/', ]; $data = preg_replace($filterDataPre, ' ', $data); $data = html_entity_decode($data); $data = strip_tags($data); $data = preg_replace($filterDataPost, ' ', $data); return $data; } static public function plural(int $number, array $texts) { $cases = array (2, 0, 1, 1, 1, 2); return $texts[(($number % 100) > 4 && ($number % 100) < 20) ? 2 : $cases[min($number % 10, 5)]]; } }