3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array('james','Brandun','test'), array('james0','Brandun0','test0'), array('james1','Brandun1','test1') ); function display(array $array, $position=0){ $anotherArray=array(); foreach ($array as $subArray) { $anotherArray = $subArray[$position]; } return $anotherArray; } print_r(display($array,0)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/GsNsZ
function name:  (null)
number of ops:  9
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   17     1        INIT_FCALL                                               'print_r'
          2        INIT_FCALL                                               'display'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 0
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                                 
   19     8      > RETURN                                                   1

Function display:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/GsNsZ
function name:  display
number of ops:  11
compiled vars:  !0 = $array, !1 = $position, !2 = $anotherArray, !3 = $subArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      0
   10     2        ASSIGN                                                   !2, <array>
   11     3      > FE_RESET_R                                       $5      !0, ->8
          4    > > FE_FETCH_R                                               $5, !3, ->8
   12     5    >   FETCH_DIM_R                                      ~6      !3, !1
          6        ASSIGN                                                   !2, ~6
   11     7      > JMP                                                      ->4
          8    >   FE_FREE                                                  $5
   14     9      > RETURN                                                   !2
   15    10*     > RETURN                                                   null

End of function display

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.23 ms | 1398 KiB | 16 Q