3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassOne{ public function fun($v) { echo $v; } } class ClassTwo extends ClassOne { public function secfun($v) { $method = 'fun'; call_user_func_array("parent::$method", [$v]); } } $c = new ClassTwo; $c->secfun('asdf');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6QX27
function name:  (null)
number of ops:  7
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'ClassTwo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_METHOD_CALL                                         !0, 'secfun'
          4        SEND_VAL_EX                                              'asdf'
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class ClassOne:
Function fun:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6QX27
function name:  fun
number of ops:  3
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        ECHO                                                     !0
          2      > RETURN                                                   null

End of function fun

End of class ClassOne.

Class ClassTwo:
Function secfun:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6QX27
function name:  secfun
number of ops:  10
compiled vars:  !0 = $v, !1 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        ASSIGN                                                   !1, 'fun'
    8     2        NOP                                                      
          3        FAST_CONCAT                                      ~3      'parent%3A%3A', !1
          4        INIT_USER_CALL                                0          'call_user_func_array', ~3
          5        INIT_ARRAY                                       ~4      !0
          6        SEND_ARRAY                                               ~4
          7        CHECK_UNDEF_ARGS                                         
          8        DO_FCALL                                      0          
    9     9      > RETURN                                                   null

End of function secfun

Function fun:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6QX27
function name:  fun
number of ops:  3
compiled vars:  !0 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        ECHO                                                     !0
          2      > RETURN                                                   null

End of function fun

End of class ClassTwo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.28 ms | 1386 KiB | 13 Q