/test/subjects/benchmarks/roadsend/benchmarks/tests/preg_replace.php
PHP | 16 lines | 10 code | 6 blank | 0 comment | 1 complexity | c8f93fcb01b46488895bcaaaa3b61714 MD5 | raw file
Possible License(s): GPL-2.0, 0BSD, BSD-3-Clause, Unlicense, MPL-2.0-no-copyleft-exception, LGPL-2.1
- <?php
- $target = "foobarfoobarfoo";
- $target .= $target;
- $target .= $target;
- $target .= $target;
- for ($i=0; $i<1000; $i++) {
- preg_replace("/foo/", "baz", $target);
- }
- print preg_replace("/foo/", "baz", $target);
- ?>