/test/subjects/benchmarks/php_bs/xml/explode.inc.php
PHP | 17 lines | 14 code | 3 blank | 0 comment | 1 complexity | 6921e2d03dca35e9828723d334716a32 MD5 | raw file
Possible License(s): GPL-2.0, 0BSD, BSD-3-Clause, Unlicense, MPL-2.0-no-copyleft-exception, LGPL-2.1
- <?php
-
- function bench1()
- {
- global $XML;
-
- $arr = array();
- $x = explode("<title>",$XML);
- foreach($x as $v) {
- $pos = strpos($v,'</title>');
- $v = substr($v,0,$pos);
- if ($v) $arr[] = $v;
- }
- return $arr;
- }
-
- ?>