3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MyClass { public $foo = 1; } function bar(MyClass ...$o) { foreach ($o as $i) { echo $i->foo; } } $a = new MyClass; $b = new MyClass; bar($a, $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ma6al
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'MyClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   13     3        NEW                                              $5      'MyClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   15     6        INIT_FCALL                                               'bar'
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !1
          9        DO_FCALL                                      0          
         10      > RETURN                                                   1

Function bar:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 6
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/ma6al
function name:  bar
number of ops:  8
compiled vars:  !0 = $o, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV_VARIADIC                                    !0      
    7     1      > FE_RESET_R                                       $2      !0, ->6
          2    > > FE_FETCH_R                                               $2, !1, ->6
    8     3    >   FETCH_OBJ_R                                      ~3      !1, 'foo'
          4        ECHO                                                     ~3
    7     5      > JMP                                                      ->2
          6    >   FE_FREE                                                  $2
   10     7      > RETURN                                                   null

End of function bar

Class MyClass: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.9 ms | 1398 KiB | 14 Q