3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foobar($arg, $arg2) { echo __FUNCTION__, " got $arg and $arg2\n"; } class foo { function bar($arg, $arg2) { echo __METHOD__, " got $arg and $arg2\n"; } } // Call the foobar() function with 2 arguments call_user_func_array("foobar", array("arg"=> "three", "arg2" => "four")); // Call the $foo->bar() method with 2 arguments $foo = new foo; call_user_func_array(array($foo, "bar"), array("arg"=> "three", "arg2" => "four"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NfDbn
function name:  (null)
number of ops:  14
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'foobar'
          1        SEND_ARRAY                                               <array>
          2        CHECK_UNDEF_ARGS                                         
          3        DO_FCALL                                      1          
   17     4        NEW                                              $2      'foo'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !0, $2
   18     7        INIT_ARRAY                                       ~5      !0
          8        ADD_ARRAY_ELEMENT                                ~5      'bar'
          9        INIT_USER_CALL                                0          'call_user_func_array', ~5
         10        SEND_ARRAY                                               <array>
         11        CHECK_UNDEF_ARGS                                         
         12        DO_FCALL                                      1          
         13      > RETURN                                                   1

Function foobar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NfDbn
function name:  foobar
number of ops:  10
compiled vars:  !0 = $arg, !1 = $arg2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ECHO                                                     'foobar'
          3        ROPE_INIT                                     5  ~3      '+got+'
          4        ROPE_ADD                                      1  ~3      ~3, !0
          5        ROPE_ADD                                      2  ~3      ~3, '+and+'
          6        ROPE_ADD                                      3  ~3      ~3, !1
          7        ROPE_END                                      4  ~2      ~3, '%0A'
          8        ECHO                                                     ~2
    5     9      > RETURN                                                   null

End of function foobar

Class foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NfDbn
function name:  bar
number of ops:  10
compiled vars:  !0 = $arg, !1 = $arg2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        ECHO                                                     'foo%3A%3Abar'
          3        ROPE_INIT                                     5  ~3      '+got+'
          4        ROPE_ADD                                      1  ~3      ~3, !0
          5        ROPE_ADD                                      2  ~3      ~3, '+and+'
          6        ROPE_ADD                                      3  ~3      ~3, !1
          7        ROPE_END                                      4  ~2      ~3, '%0A'
          8        ECHO                                                     ~2
    9     9      > RETURN                                                   null

End of function bar

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.31 ms | 1447 KiB | 14 Q