本文整理汇总了PHP中test_regression函数的典型用法代码示例。如果您正苦于以下问题:PHP test_regression函数的具体用法?PHP test_regression怎么用?PHP test_regression使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了test_regression函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_local_scalar_assign
function test_local_scalar_assign($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
$a = 1;
$b = $a;
$c = $a + $b;
$d = $c - $a;
$e = $a + $c - $d - $b;
$f = $a | $c;
$g = $b & $d;
$h = $a ^ $b ^ $c ^ $d ^ $e ^ $f ^ $g;
$i = $a;
$j = $b;
$k = $c;
$l = $d;
$m = $e;
$n = $f;
$o = $g;
$p = $h;
} while (--$t !== 0);
if (md5($a . $b . $c . $d . $e . $f . $g . $h . $i . $j . $k . $l . $m . $n . $o . $p) !== 'efe1603e8bbb8403b6bfe7a43a39ade1') {
test_regression(__FUNCTION__);
}
return test_end(__FUNCTION__);
}
示例2: test_local_string_assign
function test_local_string_assign($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
$a = 'abcdefghijklmnop';
$b = $a;
$c = $a . $b;
$d = $c . $a;
$e = $a . $c . $d . $b;
$f = $a . $c;
$g = $b . $d;
$h = $a . $b . $c . $d . $e . $f . $g;
$i = $a;
$j = $b;
$k = $c;
$l = $d;
$m = $e;
$n = $f;
$o = $g;
$p = $h;
} while (--$t !== 0);
if (md5($a . $b . $c . $d . $e . $f . $g . $h . $i . $j . $k . $l . $m . $n . $o . $p) !== '12d5479a566db15ec0028b9cf242d150') {
test_regression(__FUNCTION__);
}
return test_end(__FUNCTION__);
}
示例3: test_local_integer_assign
function test_local_integer_assign($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
$a = 6;
$b = 9;
$c = 42;
$d = 69;
$e = 4242;
$f = 17;
$g = 3200000;
$h = -3200000;
$i = $a;
$j = $b;
$k = $c;
$l = $d;
$m = $e;
$n = $f;
$o = $g;
$p = $h;
} while (--$t !== 0);
if ($g + $h !== 0) {
test_regression(__FUNCTION__);
}
return test_end(__FUNCTION__);
}
示例4: test_local_float_assign
function test_local_float_assign($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
$a = 6.42;
$b = 9.42;
$c = 42.42;
$d = 69.42;
$e = 4242.42;
$f = 17.42;
$g = 3200000.42;
$h = -3200000.42;
$i = $a;
$j = $b;
$k = $c;
$l = $d;
$m = $e;
$n = $f;
$o = $g;
$p = $h;
} while (--$t !== 0);
if (!is_float($a) || $g + $h !== 0.0) {
test_regression(__FUNCTION__);
}
return test_end(__FUNCTION__);
}
示例5: test_mt_rand
function test_mt_rand($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
if (mt_rand(1, 255) <= 0) {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例6: test_md5
function test_md5($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
if (md5($t) == '') {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例7: test_compare_invert
function test_compare_invert($base)
{
$a = array(42);
$t = $base;
test_start(__FUNCTION__);
do {
if (!$a) {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例8: test_compare_false
function test_compare_false($base)
{
$a = array(42);
$t = $base;
test_start(__FUNCTION__);
do {
if ($a === FALSE) {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例9: test_time
function test_time($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
$a = time();
if (time() < $a) {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例10: test_empty
function test_empty($base)
{
$a = str_repeat('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 1000);
$t = $base;
test_start(__FUNCTION__);
do {
if (empty($a)) {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例11: test_local_object_assign
function test_local_object_assign($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
$a = new TestLocalObjectAssign();
} while (--$t !== 0);
if (!is_object($a) || $a->ok() !== TRUE) {
test_regression(__FUNCTION__);
}
return test_end(__FUNCTION__);
}
示例12: test_microtime
function test_microtime($base)
{
$t = $base;
test_start(__FUNCTION__);
do {
$a = microtime();
$b = microtime();
if ($a[0] < $b[0]) {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例13: test_preg_match
function test_preg_match($base)
{
$strings = array('Wesh wesh yo', 'wesh this is a benchmark', 'the PHP benchmarks', 'Yeah weshhh');
$t = (int) round($base / 5);
test_start(__FUNCTION__);
$matches = array();
do {
foreach ($strings as $string) {
if (preg_match('/(y(eah|o)|th(e|is)|wesh(hh)?|benchmarks?|a|php|is)/i', $string, $matches) <= 0 || empty($matches[1])) {
test_regression(__FUNCTION__);
}
}
} while (--$t !== 0);
return test_end(__FUNCTION__);
}
示例14: test_line
function test_line($base)
{
$t = $base;
test_start(__FUNCTION__);
$a = 0;
do {
$a += __LINE__;
$a -= __LINE__;
$a++;
} while (--$t !== 0);
if ($a !== 0) {
test_regression(__FUNCTION__);
}
return test_end(__FUNCTION__);
}
示例15: test_get_class
function test_get_class($base)
{
$a = new TestGetClass();
$t = $base;
test_start(__FUNCTION__);
do {
if (strtolower(get_class($a)) !== 'testgetclass') {
test_regression(__FUNCTION__);
}
} while (--$t !== 0);
if (!is_object($a) || $a->ok() !== TRUE) {
test_regression(__FUNCTION__);
}
return test_end(__FUNCTION__);
}