3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Checker { public function check(): void {} } class A { public function checkThings() { $check1 = new Checker; $check1->check(); } } $a = new A(); $a->checkThings(); class B { public function checkThings(Checker $checker) { $checker->check(); } } $checker = new Checker(); $b = new B(); $b->checkThings( $checker );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i2L9f
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $checker, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $3      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   16     3        INIT_METHOD_CALL                                         !0, 'checkThings'
          4        DO_FCALL                                      0          
   30     5        NEW                                              $7      'Checker'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $7
   31     8        NEW                                              $10     'B'
          9        DO_FCALL                                      0          
         10        ASSIGN                                                   !2, $10
   32    11        INIT_METHOD_CALL                                         !2, 'checkThings'
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Class Checker:
Function check:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i2L9f
function name:  check
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of function check

End of class Checker.

Class A:
Function checkthings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i2L9f
function name:  checkThings
number of ops:  6
compiled vars:  !0 = $check1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'Checker'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   11     3        INIT_METHOD_CALL                                         !0, 'check'
          4        DO_FCALL                                      0          
   12     5      > RETURN                                                   null

End of function checkthings

End of class A.

Class B:
Function checkthings:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/i2L9f
function name:  checkThings
number of ops:  4
compiled vars:  !0 = $checker
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   26     1        INIT_METHOD_CALL                                         !0, 'check'
          2        DO_FCALL                                      0          
   27     3      > RETURN                                                   null

End of function checkthings

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.44 ms | 1399 KiB | 13 Q