3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $a; protected $b; public $c; function f() { foreach (get_object_vars($this) as $k=>$v) { var_dump($k); } } } $x = new Foo(); $x->f(); foreach (get_object_vars($x) as $k=>$v) { var_dump($k); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 15
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 15
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/Y6IHm
function name:  (null)
number of ops:  17
compiled vars:  !0 = $x, !1 = $v, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   15     3        INIT_METHOD_CALL                                         !0, 'f'
          4        DO_FCALL                                      0          
   16     5        INIT_FCALL                                               'get_object_vars'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $7      
          8      > FE_RESET_R                                       $8      $7, ->15
          9    > > FE_FETCH_R                                       ~9      $8, !1, ->15
         10    >   ASSIGN                                                   !2, ~9
   17    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
   16    14      > JMP                                                      ->9
         15    >   FE_FREE                                                  $8
   18    16      > RETURN                                                   1

Class Foo:
Function f:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/Y6IHm
function name:  f
number of ops:  13
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'get_object_vars'
          1        FETCH_THIS                                       ~2      
          2        SEND_VAL                                                 ~2
          3        DO_ICALL                                         $3      
          4      > FE_RESET_R                                       $4      $3, ->11
          5    > > FE_FETCH_R                                       ~5      $4, !0, ->11
          6    >   ASSIGN                                                   !1, ~5
    9     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                                 
    8    10      > JMP                                                      ->5
         11    >   FE_FREE                                                  $4
   11    12      > RETURN                                                   null

End of function f

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.49 ms | 1388 KiB | 17 Q