3v4l.org

run code in 300+ PHP versions simultaneously
<?php $biger_array = array( $a = array("DHL","ACS", "UPS"), $b = array("PayPal", "BrainTree", "UnionPay") ); $sizeof_biger_array = sizeof($biger_array); $array_with_size_of_smaller_arrays = array(); for ($x=0; $x<$sizeof_biger_array; $x++){ //$array_with_size_of_smaller_arrays[] =; $array_with_size_of_smaller_arrays[] = sizeof($biger_array[$x]); } function forLoopDynamic(array $array, array $number_of_vars_in_every_array) { //print 'Inside `aMemberFunc()`'; $sizeOfTheBigerArray = sizeof($number_of_vars_in_every_array); for ($i=0; $i<$sizeOfTheBigerArray; $i++){ echo $number_of_vars_in_every_array[$i]; for ($x=0; $x<($number_of_vars_in_every_array[$i]); $x++){ echo $array[$i][$x]; } } } forLoopDynamic($a, $array_with_size_of_smaller_arrays); //echo $biger_array[0][0]; //echo $biger_array[1][0]; echo sizeof($array_with_size_of_smaller_arrays); //print_R($array_with_size_of_smaller_arrays);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
Branch analysis from position: 10
filename:       /in/i1Qa2
function name:  (null)
number of ops:  24
compiled vars:  !0 = $biger_array, !1 = $a, !2 = $b, !3 = $sizeof_biger_array, !4 = $array_with_size_of_smaller_arrays, !5 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                           ~6      !1, <array>
          1        INIT_ARRAY                                       ~7      ~6
    6     2        ASSIGN                                           ~8      !2, <array>
          3        ADD_ARRAY_ELEMENT                                ~7      ~8
    3     4        ASSIGN                                                   !0, ~7
    9     5        COUNT                                            ~10     !0
          6        ASSIGN                                                   !3, ~10
   11     7        ASSIGN                                                   !4, <array>
   13     8        ASSIGN                                                   !5, 0
          9      > JMP                                                      ->15
   16    10    >   FETCH_DIM_R                                      ~15     !0, !5
         11        COUNT                                            ~16     ~15
         12        ASSIGN_DIM                                               !4
         13        OP_DATA                                                  ~16
   13    14        PRE_INC                                                  !5
         15    >   IS_SMALLER                                               !5, !3
         16      > JMPNZ                                                    ~18, ->10
   39    17    >   INIT_FCALL                                               'forloopdynamic'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !4
         20        DO_FCALL                                      0          
   43    21        COUNT                                            ~20     !4
         22        ECHO                                                     ~20
   44    23      > RETURN                                                   1

Function forloopdynamic:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 6
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 6
Branch analysis from position: 20
Branch analysis from position: 6
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 10
Branch analysis from position: 17
Branch analysis from position: 10
filename:       /in/i1Qa2
function name:  forLoopDynamic
number of ops:  21
compiled vars:  !0 = $array, !1 = $number_of_vars_in_every_array, !2 = $sizeOfTheBigerArray, !3 = $i, !4 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   23     2        COUNT                                            ~5      !1
          3        ASSIGN                                                   !2, ~5
   25     4        ASSIGN                                                   !3, 0
          5      > JMP                                                      ->18
   26     6    >   FETCH_DIM_R                                      ~8      !1, !3
          7        ECHO                                                     ~8
   28     8        ASSIGN                                                   !4, 0
          9      > JMP                                                      ->14
   29    10    >   FETCH_DIM_R                                      ~10     !0, !3
         11        FETCH_DIM_R                                      ~11     ~10, !4
         12        ECHO                                                     ~11
   28    13        PRE_INC                                                  !4
         14    >   FETCH_DIM_R                                      ~13     !1, !3
         15        IS_SMALLER                                               !4, ~13
         16      > JMPNZ                                                    ~14, ->10
   25    17    >   PRE_INC                                                  !3
         18    >   IS_SMALLER                                               !3, !2
         19      > JMPNZ                                                    ~16, ->6
   36    20    > > RETURN                                                   null

End of function forloopdynamic

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.5 ms | 1403 KiB | 14 Q