3v4l.org

run code in 300+ PHP versions simultaneously
<?php class x { public function _list() { echo __METHOD__ . " called\n"; } public function _class() { echo __METHOD__ . " called\n"; } public function __call($m, $args) { call_user_func_array(array($this, '_' . $m), $args); } } $x = new x; $x->list(); $x->class();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVvKl
function name:  (null)
number of ops:  8
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   NEW                                              $1      'x'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   23     3        INIT_METHOD_CALL                                         !0, 'list'
          4        DO_FCALL                                      0          
   24     5        INIT_METHOD_CALL                                         !0, 'class'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

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

End of function _list

Function _class:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVvKl
function name:  _class
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ECHO                                                     'x%3A%3A_class+called%0A'
   14     1      > RETURN                                                   null

End of function _class

Function __call:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lVvKl
function name:  __call
number of ops:  11
compiled vars:  !0 = $m, !1 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   18     2        FETCH_THIS                                       ~2      
          3        INIT_ARRAY                                       ~3      ~2
          4        CONCAT                                           ~4      '_', !0
          5        ADD_ARRAY_ELEMENT                                ~3      ~4
          6        INIT_USER_CALL                                0          'call_user_func_array', ~3
          7        SEND_ARRAY                                               !1
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      0          
   19    10      > RETURN                                                   null

End of function __call

End of class x.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.16 ms | 1386 KiB | 13 Q