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/bR1Yc
function name:  (null)
number of ops:  162
compiled vars:  !0 = $g_var, !1 = $t0, !2 = $t, !3 = $overhead, !4 = $last_time, !5 = $x
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  $8      
          8        ASSIGN                                           ~9      !2, $8
          9        ASSIGN                                                   !1, ~9
  287    10        INIT_FCALL                                               'empty_loop'
         11        FETCH_CONSTANT                                   ~11     'N'
         12        SEND_VAL                                                 ~11
         13        DO_FCALL                                      0          
  288    14        INIT_FCALL                                               'end_test'
         15        SEND_VAR                                                 !2
         16        SEND_VAL                                                 'empty_loop'
         17        DO_FCALL                                      0  $13     
         18        ASSIGN                                                   !2, $13
  289    19        ASSIGN                                                   !3, !4
  290    20        INIT_FCALL                                               'simpleucall'
         21        FETCH_CONSTANT                                   ~16     'N'
         22        SEND_VAL                                                 ~16
         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  $18     
         29        ASSIGN                                                   !2, $18
  292    30        INIT_FCALL                                               'simpleudcall'
         31        FETCH_CONSTANT                                   ~20     'N'
         32        SEND_VAL                                                 ~20
         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  $22     
         39        ASSIGN                                                   !2, $22
  294    40        INIT_FCALL                                               'simpleicall'
         41        FETCH_CONSTANT                                   ~24     'N'
         42        SEND_VAL                                                 ~24
         43        DO_FCALL                                      0          
  295    44        INIT_FCALL                                               'end_test'
         45        SEND_VAR                                                 !2
         46        SEND_VAL                                                 'int_func%28%29'
         47        SEND_VAR                                                 !3
         48        DO_FCALL                                      0  $26     
         49        ASSIGN                                                   !2, $26
  296    50        INIT_STATIC_METHOD_CALL                                  'Foo', 'read_static'
         51        FETCH_CONSTANT                                   ~28     'N'
         52        SEND_VAL                                                 ~28
         53        DO_FCALL                                      0          
  297    54        INIT_FCALL                                               'end_test'
         55        SEND_VAR                                                 !2
         56        SEND_VAL                                                 '%24x+%3D+self%3A%3A%24x'
         57        SEND_VAR                                                 !3
         58        DO_FCALL                                      0  $30     
         59        ASSIGN                                                   !2, $30
  298    60        INIT_STATIC_METHOD_CALL                                  'Foo', 'write_static'
         61        FETCH_CONSTANT                                   ~32     'N'
         62        SEND_VAL                                                 ~32
         63        DO_FCALL                                      0          
  299    64        INIT_FCALL                                               'end_test'
         65        SEND_VAR                                                 !2
         66        SEND_VAL                                                 'self%3A%3A%24x+%3D+0'
         67        SEND_VAR                                                 !3
         68        DO_FCALL                                      0  $34     
         69        ASSIGN                                                   !2, $34
  300    70        INIT_STATIC_METHOD_CALL                                  'Foo', 'isset_static'
         71        FETCH_CONSTANT                                   ~36     'N'
         72        SEND_VAL                                                 ~36
         73        DO_FCALL                                      0          
  301    74        INIT_FCALL                                               'end_test'
         75        SEND_VAR                                                 !2
         76        SEND_VAL                                                 'isset%28self%3A%3A%24x%29'
         77        SEND_VAR                                                 !3
         78        DO_FCALL                                      0  $38     
         79        ASSIGN                                                   !2, $38
  302    80        INIT_STATIC_METHOD_CALL                                  'Foo', 'empty_static'
         81        FETCH_CONSTANT                                   ~40     'N'
         82        SEND_VAL                                                 ~40
         83        DO_FCALL                                      0          
  303    84        INIT_FCALL                                               'end_test'
         85        SEND_VAR                                                 !2
         86        SEND_VAL                                                 'empty%28self%3A%3A%24x%29'
         87        SEND_VAR                                                 !3
         88        DO_FCALL                                      0  $42     
         89        ASSIGN                                                   !2, $42
  304    90        INIT_FCALL                                               'read_static'
         91        FETCH_CONSTANT                                   ~44     'N'
         92        SEND_VAL                                                 ~44
         93        DO_FCALL                                      0          
  305    94        INIT_FCALL                                               'end_test'
         95        SEND_VAR                                                 !2
         96        SEND_VAL                                                 '%24x+%3D+Foo%3A%3A%24x'
         97        SEND_VAR                                                 !3
         98        DO_FCALL                                      0  $46     
         99        ASSIGN                                                   !2, $46
  306   100        INIT_FCALL                                               'write_static'
        101        FETCH_CONSTANT                                   ~48     'N'
        102        SEND_VAL                                                 ~48
        103        DO_FCALL                                      0          
  307   104        INIT_FCALL                                               'end_test'
        105        SEND_VAR                                                 !2
        106        SEND_VAL                                                 'Foo%3A%3A%24x+%3D+0'
        107        SEND_VAR                                                 !3
        108        DO_FCALL                                      0  $50     
        109        ASSIGN                                                   !2, $50
  308   110        INIT_FCALL                                               'isset_static'
        111        FETCH_CONSTANT                                   ~52     'N'
        112        SEND_VAL                                                 ~52
        113        DO_FCALL                                      0          
  309   114        INIT_FCALL                                               'end_test'
        115        SEND_VAR                                                 !2
        116        SEND_VAL                                                 'isset%28Foo%3A%3A%24x%29'
        117        SEND_VAR                                                 !3
        118        DO_FCALL                                      0  $54     
        119        ASSIGN                                                   !2, $54
  310   120        INIT_FCALL                                               'empty_static'
        121        FETCH_CONSTANT                                   ~56     'N'
        122        SEND_VAL                                                 ~56
        123        DO_FCALL                                      0          
  311   124        INIT_FCALL                                               'end_test'
        125        SEND_VAR                                                 !2
        126        SEND_VAL                                                 'empty%28Foo%3A%3A%24x%29'
        127        SEND_VAR                                                 !3
        128        DO_FCALL                                      0  $58     
        129        ASSIGN                                                   !2, $58
  312   130        INIT_STATIC_METHOD_CALL                                  'Foo', 'call_static'
        131        FETCH_CONSTANT                                   ~60     'N'
        132        SEND_VAL                                                 ~60
        133        DO_FCALL                                      0          
  313   134        INIT_FCALL                                               'end_test'
        135        SEND_VAR                                                 !2
        136        SEND_VAL                                                 'self%3A%3Af%28%29'
        137        SEND_VAR                                                 !3
        138        DO_FCALL                                      0  $62     
        139        ASSIGN                                                   !2, $62
  314   140        INIT_FCALL                                               'call_static'
        141        FETCH_CONSTANT                                   ~64     'N'
        142        SEND_VAL                                                 ~64
        143        DO_FCALL                                      0          
  315   144        INIT_FCALL                                               'end_test'
        145        SEND_VAR                                                 !2
        146        SEND_VAL                                                 'Foo%3A%3Af%28%29'
        147        SEND_VAR                                                 !3
        148        DO_FCALL                                      0  $66     
        149        ASSIGN                                                   !2, $66
  316   150        NEW                                              $68     'Foo'
        151        DO_FCALL                                      0          
        152        ASSIGN                                                   !5, $68
  317   153        INIT_METHOD_CALL                                         !5, 'read_prop'
        154        FETCH_CONSTANT                                   ~71     'N'
        155        SEND_VAL_EX                                              ~71
        156        DO_FCALL                                      0          
  360   157        INIT_FCALL                                               'total'
        158        SEND_VAR                                                 !1
        159        SEND_VAL                                                 'Total'
        160        DO_FCALL                                      0          
        161      > RETURN                                                   1

Function hallo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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/bR1Yc
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                                                   n

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.52 ms | 1431 KiB | 41 Q