3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test{ function abc($d,$e){ echo "abc{$d}{$e}";} } $x = new Test; $callback = [$x,'abc']; call_user_func_array($callback, ['d','e']); echo "\n"; $callback(...['x','z']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5KUNA
function name:  (null)
number of ops:  16
compiled vars:  !0 = $x, !1 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    8     3        INIT_ARRAY                                       ~5      !0
          4        ADD_ARRAY_ELEMENT                                ~5      'abc'
          5        ASSIGN                                                   !1, ~5
   10     6        INIT_USER_CALL                                0          'call_user_func_array', !1
          7        SEND_ARRAY                                               <array>
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      0          
   11    10        ECHO                                                     '%0A'
   12    11        INIT_DYNAMIC_CALL                                        !1
         12        SEND_UNPACK                                              <array>
         13        CHECK_UNDEF_ARGS                                         
         14        DO_FCALL                                      1          
         15      > RETURN                                                   1

Class Test:
Function abc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5KUNA
function name:  abc
number of ops:  7
compiled vars:  !0 = $d, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        ROPE_INIT                                     3  ~3      'abc'
          3        ROPE_ADD                                      1  ~3      ~3, !0
          4        ROPE_END                                      2  ~2      ~3, !1
          5        ECHO                                                     ~2
          6      > RETURN                                                   null

End of function abc

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.31 ms | 1394 KiB | 13 Q