|
|
|
|
@ -18,7 +18,7 @@ function hallo2() { |
|
|
|
|
|
|
|
|
|
function simpleicall($n) { |
|
|
|
|
for ($i = 0; $i < $n; $i++) |
|
|
|
|
function_exists('hallo'); |
|
|
|
|
$ret = function_exists('hallo'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
class Foo { |
|
|
|
|
@ -287,74 +287,74 @@ function main() |
|
|
|
|
empty_loop(N); |
|
|
|
|
$t = end_test($t, 'empty_loop'); |
|
|
|
|
$overhead = $last_time; |
|
|
|
|
simpleucall(N); |
|
|
|
|
$t = end_test($t, 'func()', $overhead); |
|
|
|
|
simpleudcall(N); |
|
|
|
|
$t = end_test($t, 'undef_func()', $overhead); |
|
|
|
|
// simpleucall(N); |
|
|
|
|
// $t = end_test($t, 'func()', $overhead); |
|
|
|
|
// simpleudcall(N); |
|
|
|
|
// $t = end_test($t, 'undef_func()', $overhead); |
|
|
|
|
simpleicall(N); |
|
|
|
|
$t = end_test($t, 'int_func()', $overhead); |
|
|
|
|
Foo::read_static(N); |
|
|
|
|
$t = end_test($t, '$x = self::$x', $overhead); |
|
|
|
|
Foo::write_static(N); |
|
|
|
|
$t = end_test($t, 'self::$x = 0', $overhead); |
|
|
|
|
Foo::isset_static(N); |
|
|
|
|
$t = end_test($t, 'isset(self::$x)', $overhead); |
|
|
|
|
Foo::empty_static(N); |
|
|
|
|
$t = end_test($t, 'empty(self::$x)', $overhead); |
|
|
|
|
read_static(N); |
|
|
|
|
$t = end_test($t, '$x = Foo::$x', $overhead); |
|
|
|
|
write_static(N); |
|
|
|
|
$t = end_test($t, 'Foo::$x = 0', $overhead); |
|
|
|
|
isset_static(N); |
|
|
|
|
$t = end_test($t, 'isset(Foo::$x)', $overhead); |
|
|
|
|
empty_static(N); |
|
|
|
|
$t = end_test($t, 'empty(Foo::$x)', $overhead); |
|
|
|
|
Foo::call_static(N); |
|
|
|
|
$t = end_test($t, 'self::f()', $overhead); |
|
|
|
|
call_static(N); |
|
|
|
|
$t = end_test($t, 'Foo::f()', $overhead); |
|
|
|
|
$x = new Foo(); |
|
|
|
|
$x->read_prop(N); |
|
|
|
|
$t = end_test($t, '$x = $this->x', $overhead); |
|
|
|
|
$x->write_prop(N); |
|
|
|
|
$t = end_test($t, '$this->x = 0', $overhead); |
|
|
|
|
$x->assign_add_prop(N); |
|
|
|
|
$t = end_test($t, '$this->x += 2', $overhead); |
|
|
|
|
$x->pre_inc_prop(N); |
|
|
|
|
$t = end_test($t, '++$this->x', $overhead); |
|
|
|
|
$x->pre_dec_prop(N); |
|
|
|
|
$t = end_test($t, '--$this->x', $overhead); |
|
|
|
|
$x->post_inc_prop(N); |
|
|
|
|
$t = end_test($t, '$this->x++', $overhead); |
|
|
|
|
$x->post_dec_prop(N); |
|
|
|
|
$t = end_test($t, '$this->x--', $overhead); |
|
|
|
|
$x->isset_prop(N); |
|
|
|
|
$t = end_test($t, 'isset($this->x)', $overhead); |
|
|
|
|
$x->empty_prop(N); |
|
|
|
|
$t = end_test($t, 'empty($this->x)', $overhead); |
|
|
|
|
$x->call(N); |
|
|
|
|
$t = end_test($t, '$this->f()', $overhead); |
|
|
|
|
$x->read_const(N); |
|
|
|
|
$t = end_test($t, '$x = Foo::TEST', $overhead); |
|
|
|
|
create_object(N); |
|
|
|
|
$t = end_test($t, 'new Foo()', $overhead); |
|
|
|
|
read_const(N); |
|
|
|
|
$t = end_test($t, '$x = TEST', $overhead); |
|
|
|
|
read_auto_global(N); |
|
|
|
|
$t = end_test($t, '$x = $_GET', $overhead); |
|
|
|
|
read_global_var(N); |
|
|
|
|
$t = end_test($t, '$x = $GLOBALS[\'v\']', $overhead); |
|
|
|
|
read_hash(N); |
|
|
|
|
$t = end_test($t, '$x = $hash[\'v\']', $overhead); |
|
|
|
|
read_str_offset(N); |
|
|
|
|
$t = end_test($t, '$x = $str[0]', $overhead); |
|
|
|
|
issetor(N); |
|
|
|
|
$t = end_test($t, '$x = $a ?: null', $overhead); |
|
|
|
|
issetor2(N); |
|
|
|
|
$t = end_test($t, '$x = $f ?: tmp', $overhead); |
|
|
|
|
ternary(N); |
|
|
|
|
$t = end_test($t, '$x = $f ? $f : $a', $overhead); |
|
|
|
|
ternary2(N); |
|
|
|
|
$t = end_test($t, '$x = $f ? $f : tmp', $overhead); |
|
|
|
|
// Foo::read_static(N); |
|
|
|
|
// $t = end_test($t, '$x = self::$x', $overhead); |
|
|
|
|
// Foo::write_static(N); |
|
|
|
|
// $t = end_test($t, 'self::$x = 0', $overhead); |
|
|
|
|
// Foo::isset_static(N); |
|
|
|
|
// $t = end_test($t, 'isset(self::$x)', $overhead); |
|
|
|
|
// Foo::empty_static(N); |
|
|
|
|
// $t = end_test($t, 'empty(self::$x)', $overhead); |
|
|
|
|
// read_static(N); |
|
|
|
|
// $t = end_test($t, '$x = Foo::$x', $overhead); |
|
|
|
|
// write_static(N); |
|
|
|
|
// $t = end_test($t, 'Foo::$x = 0', $overhead); |
|
|
|
|
// isset_static(N); |
|
|
|
|
// $t = end_test($t, 'isset(Foo::$x)', $overhead); |
|
|
|
|
// empty_static(N); |
|
|
|
|
// $t = end_test($t, 'empty(Foo::$x)', $overhead); |
|
|
|
|
// Foo::call_static(N); |
|
|
|
|
// $t = end_test($t, 'self::f()', $overhead); |
|
|
|
|
// call_static(N); |
|
|
|
|
// $t = end_test($t, 'Foo::f()', $overhead); |
|
|
|
|
// $x = new Foo(); |
|
|
|
|
// $x->read_prop(N); |
|
|
|
|
// $t = end_test($t, '$x = $this->x', $overhead); |
|
|
|
|
// $x->write_prop(N); |
|
|
|
|
// $t = end_test($t, '$this->x = 0', $overhead); |
|
|
|
|
// $x->assign_add_prop(N); |
|
|
|
|
// $t = end_test($t, '$this->x += 2', $overhead); |
|
|
|
|
// $x->pre_inc_prop(N); |
|
|
|
|
// $t = end_test($t, '++$this->x', $overhead); |
|
|
|
|
// $x->pre_dec_prop(N); |
|
|
|
|
// $t = end_test($t, '--$this->x', $overhead); |
|
|
|
|
// $x->post_inc_prop(N); |
|
|
|
|
// $t = end_test($t, '$this->x++', $overhead); |
|
|
|
|
// $x->post_dec_prop(N); |
|
|
|
|
// $t = end_test($t, '$this->x--', $overhead); |
|
|
|
|
// $x->isset_prop(N); |
|
|
|
|
// $t = end_test($t, 'isset($this->x)', $overhead); |
|
|
|
|
// $x->empty_prop(N); |
|
|
|
|
// $t = end_test($t, 'empty($this->x)', $overhead); |
|
|
|
|
// $x->call(N); |
|
|
|
|
// $t = end_test($t, '$this->f()', $overhead); |
|
|
|
|
// $x->read_const(N); |
|
|
|
|
// $t = end_test($t, '$x = Foo::TEST', $overhead); |
|
|
|
|
// create_object(N); |
|
|
|
|
// $t = end_test($t, 'new Foo()', $overhead); |
|
|
|
|
// read_const(N); |
|
|
|
|
// $t = end_test($t, '$x = TEST', $overhead); |
|
|
|
|
// read_auto_global(N); |
|
|
|
|
// $t = end_test($t, '$x = $_GET', $overhead); |
|
|
|
|
// read_global_var(N); |
|
|
|
|
// $t = end_test($t, '$x = $GLOBALS[\'v\']', $overhead); |
|
|
|
|
// read_hash(N); |
|
|
|
|
// $t = end_test($t, '$x = $hash[\'v\']', $overhead); |
|
|
|
|
// read_str_offset(N); |
|
|
|
|
// $t = end_test($t, '$x = $str[0]', $overhead); |
|
|
|
|
// issetor(N); |
|
|
|
|
// $t = end_test($t, '$x = $a ?: null', $overhead); |
|
|
|
|
// issetor2(N); |
|
|
|
|
// $t = end_test($t, '$x = $f ?: tmp', $overhead); |
|
|
|
|
// ternary(N); |
|
|
|
|
// $t = end_test($t, '$x = $f ? $f : $a', $overhead); |
|
|
|
|
// ternary2(N); |
|
|
|
|
// $t = end_test($t, '$x = $f ? $f : tmp', $overhead); |
|
|
|
|
total(); |
|
|
|
|
} |
|
|
|
|
|