3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); function foo(&$a) { var_dump($a++); } function test($cuf, $f) { $a = array(1); $cuf($f, $a); var_dump($a, array(1)); $cuf($f, array(1)); var_dump($a, array(1)); call_user_func_array($f, $a); var_dump($a, array(1)); call_user_func_array($f, array(1)); var_dump($a, array(1)); } test('call_user_func_array', 'foo');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TuVLV
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
   15     3        INIT_FCALL                                               'test'
          4        SEND_VAL                                                 'call_user_func_array'
          5        SEND_VAL                                                 'foo'
          6        DO_FCALL                                      0          
          7      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TuVLV
function name:  foo
number of ops:  6
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        INIT_FCALL                                               'var_dump'
          2        POST_INC                                         ~1      !0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
          5      > RETURN                                                   null

End of function foo

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TuVLV
function name:  test
number of ops:  36
compiled vars:  !0 = $cuf, !1 = $f, !2 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        ASSIGN                                                   !2, <array>
    6     3        INIT_DYNAMIC_CALL                                        !0
          4        SEND_VAR_EX                                              !1
          5        SEND_VAR_EX                                              !2
          6        DO_FCALL                                      0          
    7     7        INIT_FCALL                                               'var_dump'
          8        SEND_VAR                                                 !2
          9        SEND_VAL                                                 <array>
         10        DO_ICALL                                                 
    8    11        INIT_DYNAMIC_CALL                                        !0
         12        SEND_VAR_EX                                              !1
         13        SEND_VAL_EX                                              <array>
         14        DO_FCALL                                      0          
    9    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !2
         17        SEND_VAL                                                 <array>
         18        DO_ICALL                                                 
   10    19        INIT_USER_CALL                                0          'call_user_func_array', !1
         20        SEND_ARRAY                                               !2
         21        CHECK_UNDEF_ARGS                                         
         22        DO_FCALL                                      0          
   11    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 <array>
         26        DO_ICALL                                                 
   12    27        INIT_USER_CALL                                0          'call_user_func_array', !1
         28        SEND_ARRAY                                               <array>
         29        CHECK_UNDEF_ARGS                                         
         30        DO_FCALL                                      0          
   13    31        INIT_FCALL                                               'var_dump'
         32        SEND_VAR                                                 !2
         33        SEND_VAL                                                 <array>
         34        DO_ICALL                                                 
   14    35      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.57 ms | 1403 KiB | 18 Q