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)); echo "--------\n"; $cuf($f, array(1)); var_dump($a, array(1)); echo "--------\n"; call_user_func_array($f, $a); var_dump($a, array(1)); echo "--------\n"; call_user_func_array($f, array(1)); var_dump($a, array(1)); echo "--------\n"; } test('call_user_func_array', 'foo');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G02CA
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                                                 
   20     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/G02CA
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/G02CA
function name:  test
number of ops:  40
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        ECHO                                                     '--------%0A'
    9    12        INIT_DYNAMIC_CALL                                        !0
         13        SEND_VAR_EX                                              !1
         14        SEND_VAL_EX                                              <array>
         15        DO_FCALL                                      0          
   10    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        SEND_VAL                                                 <array>
         19        DO_ICALL                                                 
   11    20        ECHO                                                     '--------%0A'
   12    21        INIT_USER_CALL                                0          'call_user_func_array', !1
         22        SEND_ARRAY                                               !2
         23        CHECK_UNDEF_ARGS                                         
         24        DO_FCALL                                      0          
   13    25        INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !2
         27        SEND_VAL                                                 <array>
         28        DO_ICALL                                                 
   14    29        ECHO                                                     '--------%0A'
   15    30        INIT_USER_CALL                                0          'call_user_func_array', !1
         31        SEND_ARRAY                                               <array>
         32        CHECK_UNDEF_ARGS                                         
         33        DO_FCALL                                      0          
   16    34        INIT_FCALL                                               'var_dump'
         35        SEND_VAR                                                 !2
         36        SEND_VAL                                                 <array>
         37        DO_ICALL                                                 
   17    38        ECHO                                                     '--------%0A'
   19    39      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.27 ms | 1403 KiB | 18 Q