3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { protected $baz = 'Oh hai '; public function bar($name) { return $this->baz . $name; } } $foo = new Foo(); // Instance var_dump(call_user_func_array(array($foo, 'bar'), array('Mark'))); // Non staic usage var_dump(call_user_func_array(array('Foo', 'bar'), array('Mark')));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rDGSZ
function name:  (null)
number of ops:  20
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   16     3        INIT_FCALL                                               'var_dump'
          4        INIT_ARRAY                                       ~4      !0
          5        ADD_ARRAY_ELEMENT                                ~4      'bar'
          6        INIT_USER_CALL                                0          'call_user_func_array', ~4
          7        SEND_ARRAY                                               <array>
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      0  $5      
         10        SEND_VAR                                                 $5
         11        DO_ICALL                                                 
   19    12        INIT_FCALL                                               'var_dump'
         13        INIT_USER_CALL                                0          'call_user_func_array', <array>
         14        SEND_ARRAY                                               <array>
         15        CHECK_UNDEF_ARGS                                         
         16        DO_FCALL                                      0  $7      
         17        SEND_VAR                                                 $7
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rDGSZ
function name:  bar
number of ops:  5
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      'baz'
          2        CONCAT                                           ~2      ~1, !0
          3      > RETURN                                                   ~2
   10     4*     > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
179.09 ms | 1395 KiB | 15 Q