3v4l.org

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

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

End of function pub

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.51 ms | 1393 KiB | 13 Q