3v4l.org

run code in 500+ PHP versions simultaneously
<?php class A { private function z() { echo __METHOD__; } public function x() { $callback = [[new $this(), "z"], []]; call_user_func_array("call_user_func_array", $callback); } } (new A())->x();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gAkh8
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   NEW                                                  $0      'A'
          1        DO_FCALL                                          0          
          2        INIT_METHOD_CALL                                             $0, 'x'
          3        DO_FCALL                                          0          
          4      > RETURN                                                       1

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

End of function z

Function x:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gAkh8
function name:  x
number of ops:  14
compiled vars:  !0 = $callback
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   FETCH_THIS                                           ~1      
          1        FETCH_CLASS                                       0  $2      ~1
          2        NEW                                                  $3      $2
          3        DO_FCALL                                          0          
          4        INIT_ARRAY                                           ~5      $3
          5        ADD_ARRAY_ELEMENT                                    ~5      'z'
          6        INIT_ARRAY                                           ~6      ~5
          7        ADD_ARRAY_ELEMENT                                    ~6      <array>
          8        ASSIGN                                                       !0, ~6
   10     9        INIT_FCALL                                                   'call_user_func_array'
         10        SEND_ARRAY                                                   !0
         11        CHECK_UNDEF_ARGS                                             
         12        DO_FCALL                                          1          
   11    13      > RETURN                                                       null

End of function x

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
230.14 ms | 3116 KiB | 14 Q