3v4l.org

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

Class Foo:
Function set:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fWCD8
function name:  set
number of ops:  4
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        ASSIGN_OBJ                                               'foo'
          2        OP_DATA                                                  !0
          3      > RETURN                                                   null

End of function set

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fWCD8
function name:  bar
number of ops:  4
compiled vars:  !0 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        FETCH_OBJ_R                                      ~1      !0, 'foo'
          2        ECHO                                                     ~1
          3      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.78 ms | 1394 KiB | 13 Q