$reader = new XMLReader();
$reader->open($file);
$counter = 0;
while ($reader->read()) {
...
$counter++; // ← счетчик обработанных узлов
}
$file_path = "your_file";
$file_handle = fopen($file_path, "rb");
$i = 0;
while (!feof($file_handle)) {
$symbol = fread($file_handle, 1);
$i++;
}
echo 'total byte = '. $i."\n";