dolibarr/dev/tools/test/testperf.php

23 lines
398 B
PHP
Raw Normal View History

2020-06-26 01:14:39 +02:00
<?php
$a = microtime(true);
$i = 0;
2021-03-01 00:48:36 +01:00
while ($i < 1000000) {
2020-06-26 01:14:39 +02:00
$key = '1234567890111213141516171819'.$i;
2021-03-01 00:48:36 +01:00
if ($i == 1000) {
$key = 'MAIN_MODULE_AAAAAiiiiiiiiiiiiiiiiiiiiiiiiiiiii';
}
2020-06-26 01:14:39 +02:00
//if (preg_match('/^MAIN_MODULE_/', $key)) {
//if (substr($key, 0, 12) == 'MAIN_MODULE_') {
2020-06-26 19:55:35 +02:00
if (strpos($key, 'MAIN_MODULE_') === 0) {
2020-06-26 01:14:39 +02:00
print "Found\n";
}
$i++;
}
$b = microtime(true);
print $b - $a."\n";