Upgraded to KH 3.3.0

This commit is contained in:
Deon George
2012-11-09 23:18:50 +11:00
parent 863bc1150a
commit ea36639638
1293 changed files with 96042 additions and 9545 deletions

View File

@@ -0,0 +1,28 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* @package Kohana/Codebench
* @category Tests
* @author Geert De Deckere <geert@idoe.be>
*/
class Bench_LtrimDigits extends Codebench {
public $description = 'Chopping off leading digits: regex vs ltrim.';
public $loops = 100000;
public $subjects = array
(
'123digits',
'no-digits',
);
public function bench_regex($subject)
{
return preg_replace('/^\d+/', '', $subject);
}
public function bench_ltrim($subject)
{
return ltrim($subject, '0..9');
}
}