3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public static function f($c) { $c->m(); return $c; } } class B { public function g($c) { $ret=A::f($c); if($ret===false) { echo "Should never print this\n"; } } } class C { public function m2() { } } $b = new B(); $b->g(new C());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/pRJHH
function name:  (null)
number of ops:  9
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   32     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   33     3        INIT_METHOD_CALL                                         !0, 'g'
          4        NEW                                              $4      'C'
          5        DO_FCALL                                      0          
          6        SEND_VAR_NO_REF_EX                                       $4
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

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

End of function f

End of class A.

Class B:
Function g:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/pRJHH
function name:  g
number of ops:  9
compiled vars:  !0 = $c, !1 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   RECV                                             !0      
   17     1        INIT_STATIC_METHOD_CALL                                  'A', 'f'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   18     5        TYPE_CHECK                                    4          !1
          6      > JMPZ                                                     ~4, ->8
   20     7    >   ECHO                                                     'Should+never+print+this%0A'
   22     8    > > RETURN                                                   null

End of function g

End of class B.

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

End of function m2

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.11 ms | 1386 KiB | 13 Q