3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function a() {echo "a";} } class B { function a() {echo "b";} } class C extends A { function a() {echo "c";} } $b = new B(); var_dump($b instanceof A); $c = new C(); var_dump($c instanceof A);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cft7Z
function name:  (null)
number of ops:  15
compiled vars:  !0 = $b, !1 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    7     3        INIT_FCALL                                               'var_dump'
          4        INSTANCEOF                                       ~5      !0, 'A'
          5        SEND_VAL                                                 ~5
          6        DO_ICALL                                                 
    9     7        NEW                                              $7      'C'
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
   10    10        INIT_FCALL                                               'var_dump'
         11        INSTANCEOF                                       ~10     !1, 'A'
         12        SEND_VAL                                                 ~10
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function a

End of class A.

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

End of function a

End of class B.

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

End of function a

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.86 ms | 1396 KiB | 15 Q