Skip to content

Commit adbeca1

Browse files
committed
test(codebench): remove bench_replace_e method from AutoLinkEmails class
1 parent 9ab777a commit adbeca1

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

modules/codebench/classes/Bench/AutoLinkEmails.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ public function bench_match_all_loop($subject)
2828
return $subject;
2929
}
3030

31-
// The "e" stands for "eval", hmm... Ugly and slow because it needs to reinterpret the PHP code upon each match.
32-
public function bench_replace_e($subject)
33-
{
34-
return preg_replace(
35-
'~\b(?<!href="mailto:|">|58;)(?!\.)[-+_a-z0-9.]++(?<!\.)@(?![-.])[-a-z0-9.]+(?<!\.)\.[a-z]{2,6}\b~ie', 'HTML::mailto("$0")', // Yuck!
36-
$subject
37-
);
38-
}
39-
4031
// This one should be quite okay, it just requires an otherwise useless single-purpose callback.
4132
public function bench_replace_callback_external($subject)
4233
{

0 commit comments

Comments
 (0)