3v4l.org

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

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

End of function test

End of class A.

Class B: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
161.96 ms | 2044 KiB | 13 Q