3v4l.org

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

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

End of function bar

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.75 ms | 1393 KiB | 13 Q