3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(&$a, $b) { $a = 'AA'; $b = 'BB'; } $a = 'A'; $b = 'B'; call_user_func_array('foo', array(&$a, $b)); assert($a === 'AA'); assert($b === 'B'); $a = 'A'; $b = 'B'; call_user_func_array('foo', array(&$a, &$b)); assert($a === 'AA'); assert($b === 'B'); $a = 'A'; $b = 'B'; call_user_func('foo', $a, $b); assert($a === 'A'); assert($b === 'B');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ojUk
function name:  (null)
number of ops:  59
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 'A'
    9     1        ASSIGN                                                   !1, 'B'
   11     2        INIT_FCALL                                               'foo'
          3        INIT_ARRAY                                       ~4      !0
          4        ADD_ARRAY_ELEMENT                                ~4      !1
          5        SEND_ARRAY                                               ~4
          6        CHECK_UNDEF_ARGS                                         
          7        DO_FCALL                                      0          
   13     8        ASSERT_CHECK                                             
          9        INIT_FCALL                                               'assert'
         10        IS_IDENTICAL                                     ~6      !0, 'AA'
         11        SEND_VAL                                                 ~6
         12        SEND_VAL                                                 'assert%28%24a+%3D%3D%3D+%27AA%27%29'
         13        DO_ICALL                                                 
   14    14        ASSERT_CHECK                                             
         15        INIT_FCALL                                               'assert'
         16        IS_IDENTICAL                                     ~8      !1, 'B'
         17        SEND_VAL                                                 ~8
         18        SEND_VAL                                                 'assert%28%24b+%3D%3D%3D+%27B%27%29'
         19        DO_ICALL                                                 
   16    20        ASSIGN                                                   !0, 'A'
   17    21        ASSIGN                                                   !1, 'B'
   19    22        INIT_FCALL                                               'foo'
         23        INIT_ARRAY                                       ~12     !0
         24        ADD_ARRAY_ELEMENT                                ~12     !1
         25        SEND_ARRAY                                               ~12
         26        CHECK_UNDEF_ARGS                                         
         27        DO_FCALL                                      0          
   21    28        ASSERT_CHECK                                             
         29        INIT_FCALL                                               'assert'
         30        IS_IDENTICAL                                     ~14     !0, 'AA'
         31        SEND_VAL                                                 ~14
         32        SEND_VAL                                                 'assert%28%24a+%3D%3D%3D+%27AA%27%29'
         33        DO_ICALL                                                 
   22    34        ASSERT_CHECK                                             
         35        INIT_FCALL                                               'assert'
         36        IS_IDENTICAL                                     ~16     !1, 'B'
         37        SEND_VAL                                                 ~16
         38        SEND_VAL                                                 'assert%28%24b+%3D%3D%3D+%27B%27%29'
         39        DO_ICALL                                                 
   24    40        ASSIGN                                                   !0, 'A'
   25    41        ASSIGN                                                   !1, 'B'
   27    42        INIT_FCALL                                               'foo'
         43        SEND_USER                                                !0
         44        SEND_USER                                                !1
         45        DO_FCALL                                      0          
   29    46        ASSERT_CHECK                                             
         47        INIT_FCALL                                               'assert'
         48        IS_IDENTICAL                                     ~21     !0, 'A'
         49        SEND_VAL                                                 ~21
         50        SEND_VAL                                                 'assert%28%24a+%3D%3D%3D+%27A%27%29'
         51        DO_ICALL                                                 
   30    52        ASSERT_CHECK                                             
         53        INIT_FCALL                                               'assert'
         54        IS_IDENTICAL                                     ~23     !1, 'B'
         55        SEND_VAL                                                 ~23
         56        SEND_VAL                                                 'assert%28%24b+%3D%3D%3D+%27B%27%29'
         57        DO_ICALL                                                 
         58      > RETURN                                                   1

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

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.43 ms | 1410 KiB | 19 Q