*/
class Bench_AutoLinkEmails extends Codebench {
public $description =
'Fixing #2772, and comparing some possibilities.';
public $loops = 1000;
public $subjects = array
(
'
- voorzitter@xxxx.com
- vicevoorzitter@xxxx.com
',
);
// The original function, with str_replace replaced by preg_replace. Looks clean.
public function bench_match_all_loop($subject)
{
if (preg_match_all('~\b(?|58;)(?!\.)[-+_a-z0-9.]++(?|58;)(?!\.)[-+_a-z0-9.]++(?|58;)(?!\.)[-+_a-z0-9.]++(?|58;)(?!\.)[-+_a-z0-9.]++(?