3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ParentClass { function id() { var_dump(self instanceof ChildClass); } } class ChildClass extends ParentClass { } $x = new ChildClass; $x->id();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yl8ck
function name:  (null)
number of ops:  6
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'ChildClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_METHOD_CALL                                         !0, 'id'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class ParentClass:
Function id:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yl8ck
function name:  id
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CONSTANT                                   ~0      'self'
          2        INSTANCEOF                                       ~1      ~0, 'ChildClass'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    7     5      > RETURN                                                   null

End of function id

End of class ParentClass.

Class ChildClass:
Function id:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Yl8ck
function name:  id
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CONSTANT                                   ~0      'self'
          2        INSTANCEOF                                       ~1      ~0, 'ChildClass'
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    7     5      > RETURN                                                   null

End of function id

End of class ChildClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.34 ms | 1395 KiB | 15 Q