3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sample( &$array ) { $array['test'] = 'test1'; } function sample1( array $fruit ) { var_dump( $fruit ); } $test = array( 'test2' => 'test3' ); sample( $test ); var_dump( $test );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NO5pH
function name:  (null)
number of ops:  8
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, <array>
   15     1        INIT_FCALL                                               'sample'
          2        SEND_REF                                                 !0
          3        DO_FCALL                                      0          
   17     4        INIT_FCALL                                               'var_dump'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

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

End of function sample

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

End of function sample1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.77 ms | 1398 KiB | 16 Q