3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { public function exec(array $context) { $context['bla'] = 'hoi'; } } class B extends A { public function exec(array $context) { parent::exec($context); var_dump($context); } } $b = new B(); $b->exec();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8lpMJ
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, 'exec'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Class A:
Function exec:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8lpMJ
function name:  exec
number of ops:  4
compiled vars:  !0 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        ASSIGN_DIM                                               !0, 'bla'
          2        OP_DATA                                                  'hoi'
    6     3      > RETURN                                                   null

End of function exec

End of class A.

Class B:
Function exec:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8lpMJ
function name:  exec
number of ops:  8
compiled vars:  !0 = $context
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        INIT_STATIC_METHOD_CALL                                  'exec'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
   12     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   13     7      > RETURN                                                   null

End of function exec

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.95 ms | 1395 KiB | 15 Q