3v4l.org

run code in 300+ PHP versions simultaneously
<?php class person { public $name; public function hi($name) { $this->name = $name; return $this->name . ' hello!'; } } $rs = call_user_func_array(array(new person(), 'hi'), array('Alex')); var_dump($rs);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7l4SU
function name:  (null)
number of ops:  13
compiled vars:  !0 = $rs
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $1      'person'
          1        DO_FCALL                                      0          
          2        INIT_ARRAY                                       ~3      $1
          3        ADD_ARRAY_ELEMENT                                ~3      'hi'
          4        INIT_USER_CALL                                0          'call_user_func_array', ~3
          5        SEND_ARRAY                                               <array>
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0  $4      
          8        ASSIGN                                                   !0, $4
   15     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
         12      > RETURN                                                   1

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

End of function hi

End of class person.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.09 ms | 1395 KiB | 15 Q