/test/subjects/benchmarks/php_bs/xml/explode.inc.php
http://phc.googlecode.com/ · PHP · 17 lines · 14 code · 3 blank · 0 comment · 1 complexity · 6921e2d03dca35e9828723d334716a32 MD5 · raw file
- <?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;
- }
-
- ?>