3v4l.org

run code in 300+ PHP versions simultaneously
<?php //https://github.com/php/php-src/blob/master/Zend/micro_bench.php function hallo() { } function simpleucall($n) { for ($i = 0; $i < $n; $i++) hallo(); } function simpleudcall($n) { for ($i = 0; $i < $n; $i++) hallo2(); } function hallo2() { } function simpleicall($n) { for ($i = 0; $i < $n; $i++) func_num_args(); } class Foo { static $a = 0; public $b = 0; const TEST = 0; static function read_static($n) { for ($i = 0; $i < $n; ++$i) { $x = self::$a; } } static function write_static($n) { for ($i = 0; $i < $n; ++$i) { self::$a = 0; } } static function isset_static($n) { for ($i = 0; $i < $n; ++$i) { $x = isset(self::$a); } } static function empty_static($n) { for ($i = 0; $i < $n; ++$i) { $x = empty(self::$a); } } static function f() { } static function call_static($n) { for ($i = 0; $i < $n; ++$i) { self::f(); } } function read_prop($n) { for ($i = 0; $i < $n; ++$i) { $x = $this->b; } } function write_prop($n) { for ($i = 0; $i < $n; ++$i) { $this->b = 0; } } function assign_add_prop($n) { for ($i = 0; $i < $n; ++$i) { $this->b += 2; } } function pre_inc_prop($n) { for ($i = 0; $i < $n; ++$i) { ++$this->b; } } function pre_dec_prop($n) { for ($i = 0; $i < $n; ++$i) { --$this->b; } } function post_inc_prop($n) { for ($i = 0; $i < $n; ++$i) { $this->b++; } } function post_dec_prop($n) { for ($i = 0; $i < $n; ++$i) { $this->b--; } } function isset_prop($n) { for ($i = 0; $i < $n; ++$i) { $x = isset($this->b); } } function empty_prop($n) { for ($i = 0; $i < $n; ++$i) { $x = empty($this->b); } } function g() { } function call($n) { for ($i = 0; $i < $n; ++$i) { $this->g(); } } function read_const($n) { for ($i = 0; $i < $n; ++$i) { $x = $this::TEST; } } } function read_static($n) { for ($i = 0; $i < $n; ++$i) { $x = Foo::$a; } } function write_static($n) { for ($i = 0; $i < $n; ++$i) { Foo::$a = 0; } } function isset_static($n) { for ($i = 0; $i < $n; ++$i) { $x = isset(Foo::$a); } } function empty_static($n) { for ($i = 0; $i < $n; ++$i) { $x = empty(Foo::$a); } } function call_static($n) { for ($i = 0; $i < $n; ++$i) { Foo::f(); } } function create_object($n) { for ($i = 0; $i < $n; ++$i) { $x = new Foo(); } } define('TEST', null); function read_const($n) { for ($i = 0; $i < $n; ++$i) { $x = TEST; } } function read_auto_global($n) { for ($i = 0; $i < $n; ++$i) { $x = $_GET; } } $g_var = 0; function read_global_var($n) { for ($i = 0; $i < $n; ++$i) { $x = $GLOBALS['g_var']; } } function read_hash($n) { $hash = array('test' => 0); for ($i = 0; $i < $n; ++$i) { $x = $hash['test']; } } function read_str_offset($n) { $str = "test"; for ($i = 0; $i < $n; ++$i) { $x = $str[1]; } } function issetor($n) { $val = array(0,1,2,3,4,5,6,7,8,9); for ($i = 0; $i < $n; ++$i) { $x = $val ?: null; } } function issetor2($n) { $f = false; $j = 0; for ($i = 0; $i < $n; ++$i) { $x = $f ?: $j + 1; } } function ternary($n) { $val = array(0,1,2,3,4,5,6,7,8,9); $f = false; for ($i = 0; $i < $n; ++$i) { $x = $f ? null : $val; } } function ternary2($n) { $f = false; $j = 0; for ($i = 0; $i < $n; ++$i) { $x = $f ? $f : $j + 1; } } /*****/ function empty_loop($n) { for ($i = 0; $i < $n; ++$i) { } } function getmicrotime() { $t = gettimeofday(); return ($t['sec'] + $t['usec'] / 1000000); } function start_test() { ob_start(); return getmicrotime(); } function end_test($start, $name, $overhead = null) { global $total; global $last_time; $end = getmicrotime(); ob_end_clean(); $last_time = $end-$start; $total += $last_time; $num = number_format($last_time,3); $pad = str_repeat(" ", 24-strlen($name)-strlen($num)); if (is_null($overhead)) { echo $name.$pad.$num."\n"; } else { $num2 = number_format($last_time - $overhead,3); echo $name.$pad.$num." ".$num2."\n"; } ob_start(); return getmicrotime(); } function total() { global $total; $pad = str_repeat("-", 24); echo $pad."\n"; $num = number_format($total,3); $pad = str_repeat(" ", 24-strlen("Total")-strlen($num)); echo "Total".$pad.$num."\n"; } const N = 5000000; $t0 = $t = start_test(); 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); /*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); */ total($t0, "Total");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cb2j0
function name:  (null)
number of ops:  45
compiled vars:  !0 = $g_var, !1 = $t0, !2 = $t, !3 = $overhead, !4 = $last_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  170     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'TEST'
          2        SEND_VAL                                                 null
          3        DO_ICALL                                                 
  184     4        ASSIGN                                                   !0, 0
  284     5        DECLARE_CONST                                            'N', 5000000
  286     6        INIT_FCALL                                               'start_test'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                           ~8      !2, $7
          9        ASSIGN                                                   !1, ~8
  287    10        INIT_FCALL                                               'empty_loop'
         11        FETCH_CONSTANT                                   ~10     'N'
         12        SEND_VAL                                                 ~10
         13        DO_FCALL                                      0          
  288    14        INIT_FCALL                                               'end_test'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 'empty_loop'
         17        DO_FCALL                                      0  $12     
         18        ASSIGN                                                   !2, $12
  289    19        ASSIGN                                                   !3, !4
  290    20        INIT_FCALL                                               'simpleucall'
         21        FETCH_CONSTANT                                   ~15     'N'
         22        SEND_VAL                                                 ~15
         23        DO_FCALL                                      0          
  291    24        INIT_FCALL                                               'end_test'
         25        SEND_VAR                                                 !2
         26        SEND_VAL                                                 'func%28%29'
         27        SEND_VAR                                                 !3
         28        DO_FCALL                                      0  $17     
         29        ASSIGN                                                   !2, $17
  292    30        INIT_FCALL                                               'simpleudcall'
         31        FETCH_CONSTANT                                   ~19     'N'
         32        SEND_VAL                                                 ~19
         33        DO_FCALL                                      0          
  293    34        INIT_FCALL                                               'end_test'
         35        SEND_VAR                                                 !2
         36        SEND_VAL                                                 'undef_func%28%29'
         37        SEND_VAR                                                 !3
         38        DO_FCALL                                      0  $21     
         39        ASSIGN                                                   !2, $21
  360    40        INIT_FCALL                                               'total'
         41        SEND_VAR                                                 !1
         42        SEND_VAL                                                 'Total'
         43        DO_FCALL                                      0          
         44      > RETURN                                                   1

Function hallo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cb2j0
function name:  hallo
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E > > RETURN                                                   null

End of function hallo

Function simpleucall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  simpleucall
number of ops:  9
compiled vars:  !0 = $n, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
    9     3    >   INIT_FCALL                                               'hallo'
          4        DO_FCALL                                      0          
    8     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~5, ->3
   10     8    > > RETURN                                                   null

End of function simpleucall

Function simpleudcall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  simpleudcall
number of ops:  9
compiled vars:  !0 = $n, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
   14     3    >   INIT_FCALL_BY_NAME                                       'hallo2'
          4        DO_FCALL                                      0          
   13     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~5, ->3
   15     8    > > RETURN                                                   null

End of function simpleudcall

Function hallo2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cb2j0
function name:  hallo2
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E > > RETURN                                                   null

End of function hallo2

Function simpleicall:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  simpleicall
number of ops:  9
compiled vars:  !0 = $n, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
   21     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
   22     3    >   FUNC_NUM_ARGS                                    ~3      
          4        FREE                                                     ~3
   21     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~5, ->3
   23     8    > > RETURN                                                   null

End of function simpleicall

Function read_static:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  read_static
number of ops:  9
compiled vars:  !0 = $n, !1 = $i, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  134     0  E >   RECV                                             !0      
  135     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
  136     3    >   FETCH_STATIC_PROP_R          unknown             ~4      'a'
          4        ASSIGN                                                   !2, ~4
  135     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~7, ->3
  138     8    > > RETURN                                                   null

End of function read_static

Function write_static:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  write_static
number of ops:  9
compiled vars:  !0 = $n, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  140     0  E >   RECV                                             !0      
  141     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
  142     3    >   ASSIGN_STATIC_PROP                                       'a', 'Foo'
          4        OP_DATA                                                  0
  141     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~5, ->3
  144     8    > > RETURN                                                   null

End of function write_static

Function isset_static:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  isset_static
number of ops:  9
compiled vars:  !0 = $n, !1 = $i, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  146     0  E >   RECV                                             !0      
  147     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
  148     3    >   ISSET_ISEMPTY_STATIC_PROP                        ~4      'a'
          4        ASSIGN                                                   !2, ~4
  147     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~7, ->3
  150     8    > > RETURN                                                   null

End of function isset_static

Function empty_static:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  empty_static
number of ops:  9
compiled vars:  !0 = $n, !1 = $i, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  152     0  E >   RECV                                             !0      
  153     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
  154     3    >   ISSET_ISEMPTY_STATIC_PROP                        ~4      'a'
          4        ASSIGN                                                   !2, ~4
  153     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~7, ->3
  156     8    > > RETURN                                                   null

End of function empty_static

Function call_static:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  call_static
number of ops:  9
compiled vars:  !0 = $n, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  158     0  E >   RECV                                             !0      
  159     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
  160     3    >   INIT_STATIC_METHOD_CALL                                  'Foo', 'f'
          4        DO_FCALL                                      0          
  159     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~5, ->3
  162     8    > > RETURN                                                   null

End of function call_static

Function create_object:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  create_object
number of ops:  10
compiled vars:  !0 = $n, !1 = $i, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  164     0  E >   RECV                                             !0      
  165     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
  166     3    >   NEW                                              $4      'Foo'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !2, $4
  165     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, !0
          8      > JMPNZ                                                    ~8, ->3
  168     9    > > RETURN                                                   null

End of function create_object

Function read_const:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  read_const
number of ops:  9
compiled vars:  !0 = $n, !1 = $i, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  172     0  E >   RECV                                             !0      
  173     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
  174     3    >   FETCH_CONSTANT                                   ~4      'TEST'
          4        ASSIGN                                                   !2, ~4
  173     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~7, ->3
  176     8    > > RETURN                                                   null

End of function read_const

Function read_auto_global:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 3
Branch analysis from position: 8
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  read_auto_global
number of ops:  9
compiled vars:  !0 = $n, !1 = $i, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  178     0  E >   RECV                                             !0      
  179     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->6
  180     3    >   FETCH_R                      global              ~4      '_GET'
          4        ASSIGN                                                   !2, ~4
  179     5        PRE_INC                                                  !1
          6    >   IS_SMALLER                                               !1, !0
          7      > JMPNZ                                                    ~7, ->3
  182     8    > > RETURN                                                   null

End of function read_auto_global

Function read_global_var:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/Cb2j0
function name:  read_global_var
number of ops:  10
compiled vars:  !0 = $n, !1 = $i, !2 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  186     0  E >   RECV                                             !0      
  187     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
  188     3    >   FETCH_R                      global              ~4      'GLOBALS'
          4        FETCH_DIM_R                                      ~5      ~4, 'g_var'
          5        ASSIGN                                                   !2, ~5
  187     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, !0
          8      > JMPNZ                                                    ~8, ->3
  190     9    > > RETURN                                                   null

End of function read_global_var

Function read_hash:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
Branch analysis from position: 4
filename:       /in/Cb2j0
function name:  read_hash
number of ops:  10
compiled vars:  !0 = $n, !1 = $hash, !2 = $i, !3 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  192     0  E >   RECV                                             !0      
  193     1        ASSIGN                                                   !1, <array>
  194     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->7
  195     4    >   FETCH_DIM_R                                      ~6      !1, 'test'
          5        ASSIGN                                                   !3, ~6
  194     6        PRE_INC                                                  !2
          7    >   IS_SMALLER                                               !2, !0
          8      > JMPNZ                                                    ~9, ->4
  197     9    > > RETURN                                                   null

End of function read_hash

Function read_str_offset:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 4
Branch analysis from position: 9
Branch analysis from position: 4
filename:       /in/Cb2j0
function name:  read_str_offset
number of ops:  10
compiled vars:  !0 = $n, !1 = $str, !2 = $i, !3 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  199     0  E >   RECV                                             !0      
  200     1        ASSIGN                                                   !1, 'test'
  201     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->7
  202     4    >   FETCH_DIM_R                                      ~6      !1, 1
          5        ASSIGN                                                   !3, ~6
  201     6        PRE_INC                                                  !2
          7    >   IS_SMALLER                                               !2, !0
          8      > JMPNZ                                                    ~9, ->4
  204     9    > > RETURN                                                   null

End of function read_str_offset

Function issetor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 4
Branch analysis from position: 10
Branch analysis from position: 4
filename:       /in/Cb2j0
function name:  issetor
number of ops:  11
compiled vars:  !0 = $n, !1 = $val, !2 = $i, !3 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  206     0  E >   RECV                                             !0      
  207     1        ASSIGN                                                   !1, <array>
  208     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->8
  209     4    >   JMP_SET                                          ~6      !1, ->6
          5        QM_ASSIGN                                        ~6      null
          6        ASSIGN                                                   !3, ~6
  208     7        PRE_INC                                                  !2
          8    >   IS_SMALLER                                               !2, !0
          9      > JMPNZ                                                    ~9, ->4
  211    10    > > RETURN                                                   null

End of function issetor

Function issetor2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 5
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 5
Branch analysis from position: 12
Branch analysis from position: 5
filename:       /in/Cb2j0
function name:  issetor2
number of ops:  13
compiled vars:  !0 = $n, !1 = $f, !2 = $j, !3 = $i, !4 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  213     0  E >   RECV                                             !0      
  214     1        ASSIGN                                                   !1, <false>
          2        ASSIGN                                                   !2, 0
  215     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->10
  216     5    >   JMP_SET                                          ~8      !1, ->8
          6        ADD                                              ~9      !2, 1
          7        QM_ASSIGN                                        ~8      ~9
          8        ASSIGN                                                   !4, ~8
  215     9        PRE_INC                                                  !3
         10    >   IS_SMALLER                                               !3, !0
         11      > JMPNZ                                                    ~12, ->5
  218    12    > > RETURN                                                   null

End of function issetor2

Function ternary:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 5
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 5
Branch analysis from position: 13
Branch analysis from position: 5
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 5
Branch analysis from position: 13
Branch analysis from position: 5
filename:       /in/Cb2j0
function name:  ternary
number of ops:  14
compiled vars:  !0 = $n, !1 = $val, !2 = $f, !3 = $i, !4 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  220     0  E >   RECV                                             !0      
  221     1        ASSIGN                                                   !1, <array>
  222     2        ASSIGN                                                   !2, <false>
  223     3        ASSIGN                                                   !3, 0
          4      > JMP                                                      ->11
  224     5    > > JMPZ                                                     !2, ->8
          6    >   QM_ASSIGN                                        ~8      null
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~8      !1
          9    >   ASSIGN                                                   !4, ~8
  223    10        PRE_INC                                                  !3
         11    >   IS_SMALLER                                               !3, !0
         12      > JMPNZ                                                    ~11, ->5
  226    13    > > RETURN                                                   null

End of function ternary

Function ternary2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
Branch analysis from position: 5
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 5
Branch analysis from position: 14
Branch analysis from position: 5
filename:       /in/Cb2j0
function name:  ternary2
number of 

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.63 ms | 1431 KiB | 24 Q