3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A extends DOMDocument { const TEST = false; public function loadXml($source, $options = NULL) { var_dump(static::TEST); } } class B extends A { const TEST = true; } $b = new B; $b->loadXml();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ibPNY
function name:  (null)
number of ops:  6
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'B'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'loadXml'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function loadxml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ibPNY
function name:  loadXml
number of ops:  7
compiled vars:  !0 = $source, !1 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    8     2        INIT_FCALL                                               'var_dump'
          3        FETCH_CLASS_CONSTANT                             ~2      'TEST'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
    9     6      > RETURN                                                   null

End of function loadxml

End of class A.

Class B:
Function loadxml:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ibPNY
function name:  loadXml
number of ops:  7
compiled vars:  !0 = $source, !1 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
    8     2        INIT_FCALL                                               'var_dump'
          3        FETCH_CLASS_CONSTANT                             ~2      'TEST'
          4        SEND_VAL                                                 ~2
          5        DO_ICALL                                                 
    9     6      > RETURN                                                   null

End of function loadxml

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.07 ms | 1395 KiB | 15 Q