Login   Register  
PHP Classes
elePHPant
Icontem

File: index.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Dom Hastings  >  PHP Chunk  >  index.php  >  Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example implementation
Class: PHP Chunk
Extract chunks from large XML files
Author: By
Last change:
Date: 2009-07-10 06:01
Size: 321 bytes
 

Contents

Class file image Download
<?php
require_once('class.chunk.php');

$file = new Chunk('complex-test.xml', array('element' => 'Object'));

$i 0;

$start microtime(true);

while (
$xml $file->read()) {
  
$i++;
}

print 
"<p>Wow! I found {$i} &lt;Object/&gt;s in there!</p>";

$end microtime(true) - $start;

print 
"<p>Completed in {$end}s</p>";