3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo($array) { $array['extra'] = 'extra'; return $array; } function bar(&$array) { $array['extra'] = 'extra'; } $foo = array('test_foo' => 'test_foo'); $bar = array('test_bar' => 'test_bar'); $foo = foo($foo); bar($bar); echo '<pre>'; print_r($foo); print_r($bar); echo '</pre>'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PhqMo
function name:  (null)
number of ops:  18
compiled vars:  !0 = $foo, !1 = $bar
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, <array>
   14     1        ASSIGN                                                   !1, <array>
   16     2        INIT_FCALL                                               'foo'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $4      
          5        ASSIGN                                                   !0, $4
   18     6        INIT_FCALL                                               'bar'
          7        SEND_REF                                                 !1
          8        DO_FCALL                                      0          
   20     9        ECHO                                                     '%3Cpre%3E'
   21    10        INIT_FCALL                                               'print_r'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                                 
   22    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !1
         15        DO_ICALL                                                 
   23    16        ECHO                                                     '%3C%2Fpre%3E'
   25    17      > RETURN                                                   1

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

End of function foo

Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PhqMo
function name:  bar
number of ops:  4
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        ASSIGN_DIM                                               !0, 'extra'
          2        OP_DATA                                                  'extra'
   10     3      > RETURN                                                   null

End of function bar

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.29 ms | 1390 KiB | 17 Q