PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/test/subjects/benchmarks/roadsend/benchmarks/tests/preg_replace.php

http://phc.googlecode.com/
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
  1. <?php
  2. $target = "foobarfoobarfoo";
  3. $target .= $target;
  4. $target .= $target;
  5. $target .= $target;
  6. for ($i=0; $i<1000; $i++) {
  7. preg_replace("/foo/", "baz", $target);
  8. }
  9. print preg_replace("/foo/", "baz", $target);
  10. ?>