public function execute() { // sample values slightly different to avoid // UUID internal caching $alpha = UUID::hex2alnum('0523f95ac547ab45266762'); $binary = UUID::hex2bin('0523f95af547ab45266762'); $hex = '0423f95af547ab45266762'; // benchmarker requires we pass an object $id = UUID::create(); $this->bench(array(array('function' => array($id, 'bin2hex'), 'args' => array($binary)), array('function' => array($id, 'alnum2hex'), 'args' => array($alpha)), array('function' => array($id, 'hex2bin'), 'args' => array($hex)), array('function' => array($id, 'hex2alnum'), 'args' => array($hex)), array('function' => array($id, 'hex2timestamp'), 'args' => array($hex)), array('function' => array($this, 'oldhex2timestamp'), 'args' => array($hex)), array('function' => array($this, 'oldalphadecimal2timestamp'), 'args' => array($alpha)), array('function' => array($this, 'case1'), 'args' => array($binary)), array('function' => array($this, 'case2'), 'args' => array($binary)), array('function' => array($this, 'case3'), 'args' => array($alpha)), array('function' => array($this, 'case4'), 'args' => array($alpha)))); $this->output($this->getFormattedResults()); }