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 displayLocation( $array, $position){ foreach ($array as $subArray) { array_push($anotherArray,$subArray[$position]); } return $anotherArray; } $temp = displaylocation($array,0); print_r($temp); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5ePib
function name:  (null)
number of ops:  10
compiled vars:  !0 = $array, !1 = $temp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   18     1        INIT_FCALL                                               'displaylocation'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   19     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   21     9      > RETURN                                                   1

Function displaylocation:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/5ePib
function name:  displayLocation
number of ops:  13
compiled vars:  !0 = $array, !1 = $position, !2 = $subArray, !3 = $anotherArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2      > FE_RESET_R                                       $4      !0, ->10
          3    > > FE_FETCH_R                                               $4, !2, ->10
   13     4    >   INIT_FCALL                                               'array_push'
          5        SEND_REF                                                 !3
          6        FETCH_DIM_R                                      ~5      !2, !1
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
   11     9      > JMP                                                      ->3
         10    >   FE_FREE                                                  $4
   16    11      > RETURN                                                   !3
   17    12*     > RETURN                                                   null

End of function displaylocation

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.2 ms | 1403 KiB | 18 Q