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) { $value = $subArray[$position]; array_push($anotherArray,$value); } 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/RYBJh
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>
   19     1        INIT_FCALL                                               'displaylocation'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 0
          4        DO_FCALL                                      0  $3      
          5        ASSIGN                                                   !1, $3
   20     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
   22     9      > RETURN                                                   1

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

End of function displaylocation

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.96 ms | 1399 KiB | 18 Q