Skip to content

Instantly share code, notes, and snippets.

@jwpage
Created August 28, 2014 03:57
Show Gist options
  • Save jwpage/d722b9c830788f38071c to your computer and use it in GitHub Desktop.
Save jwpage/d722b9c830788f38071c to your computer and use it in GitHub Desktop.
BinaryReader optimisation test
<?php
use \PhpBinaryReader\BinaryReader;
require_once __DIR__.'/vendor/autoload.php';
include_once('/Users/johnson/Sites/xhgui/external/header.php');
$bytes = openssl_random_pseudo_bytes(100000);
$br = new BinaryReader($bytes);
while (!$br->isEof()) {
$br->readUInt8();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment