00001 <?php 00029 class AlnumFilter implements FilterInterface 00030 { 00038 public static function execute ($s, $options) 00039 { 00044 if (@preg_match('/\pL/u', 'a')) { 00045 $patron = '/[^\p{L}\p{N}]/'; 00046 } else { 00047 $patron = '/[^a-zA-Z0-9\s]/'; 00048 } 00049 return preg_replace($patron, '', (string) $s); 00050 } 00051 }