3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = array( [0] => array ( [country] => 'USA', [day] => '02', [month] => 'February', [mon] => '02', [year] => '2012' ), [1] => array ( [country] => 'Canada', [day] => '10', [month] => 'February', [mon] => '02', [year] => '2012' ) ); foreach($my_array as $array){ foreach($array as $c[country]){ if($c[country] == "USA"){ $my_array = $array['day']." ".$array['month']." ".$array['year']." (".$array['country'].")"; break; } } } echo $my_array;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 60
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 60
Branch analysis from position: 35
2 jumps found. (Code = 77) Position 1 = 36, Position 2 = 58
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 58
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 44, Position 2 = 57
Branch analysis from position: 44
1 jumps found. (Code = 42) Position 1 = 58
Branch analysis from position: 58
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 57
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 58
Branch analysis from position: 58
Branch analysis from position: 60
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 60
filename:       /in/3pel8
function name:  (null)
number of ops:  63
compiled vars:  !0 = $my_array, !1 = $array, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   FETCH_CONSTANT                                   ~3      'country'
          1        INIT_ARRAY                                       ~4      ~3
          2        INIT_ARRAY                                       ~5      'USA', ~4
    6     3        FETCH_CONSTANT                                   ~6      'day'
          4        INIT_ARRAY                                       ~7      ~6
          5        ADD_ARRAY_ELEMENT                                ~5      '02', ~7
    7     6        FETCH_CONSTANT                                   ~8      'month'
          7        INIT_ARRAY                                       ~9      ~8
          8        ADD_ARRAY_ELEMENT                                ~5      'February', ~9
    8     9        FETCH_CONSTANT                                   ~10     'mon'
         10        INIT_ARRAY                                       ~11     ~10
         11        ADD_ARRAY_ELEMENT                                ~5      '02', ~11
    9    12        FETCH_CONSTANT                                   ~12     'year'
         13        INIT_ARRAY                                       ~13     ~12
         14        ADD_ARRAY_ELEMENT                                ~5      '2012', ~13
         15        INIT_ARRAY                                       ~14     ~5, <array>
   13    16        FETCH_CONSTANT                                   ~15     'country'
         17        INIT_ARRAY                                       ~16     ~15
         18        INIT_ARRAY                                       ~17     'Canada', ~16
   14    19        FETCH_CONSTANT                                   ~18     'day'
         20        INIT_ARRAY                                       ~19     ~18
         21        ADD_ARRAY_ELEMENT                                ~17     '10', ~19
   15    22        FETCH_CONSTANT                                   ~20     'month'
         23        INIT_ARRAY                                       ~21     ~20
         24        ADD_ARRAY_ELEMENT                                ~17     'February', ~21
   16    25        FETCH_CONSTANT                                   ~22     'mon'
         26        INIT_ARRAY                                       ~23     ~22
         27        ADD_ARRAY_ELEMENT                                ~17     '02', ~23
   17    28        FETCH_CONSTANT                                   ~24     'year'
         29        INIT_ARRAY                                       ~25     ~24
         30        ADD_ARRAY_ELEMENT                                ~17     '2012', ~25
         31        ADD_ARRAY_ELEMENT                                ~14     ~17, <array>
    2    32        ASSIGN                                                   !0, ~14
   22    33      > FE_RESET_R                                       $27     !0, ->60
         34    > > FE_FETCH_R                                               $27, !1, ->60
   23    35    > > FE_RESET_R                                       $28     !1, ->58
         36    > > FE_FETCH_R                                               $28, $29, ->58
         37    >   FETCH_CONSTANT                                   ~30     'country'
         38        ASSIGN_DIM                                               !2, ~30
         39        OP_DATA                                                  $29
   24    40        FETCH_CONSTANT                                   ~32     'country'
         41        FETCH_DIM_R                                      ~33     !2, ~32
         42        IS_EQUAL                                                 ~33, 'USA'
         43      > JMPZ                                                     ~34, ->57
   25    44    >   FETCH_DIM_R                                      ~35     !1, 'day'
         45        CONCAT                                           ~36     ~35, '+'
         46        FETCH_DIM_R                                      ~37     !1, 'month'
         47        CONCAT                                           ~38     ~36, ~37
         48        CONCAT                                           ~39     ~38, '+'
         49        FETCH_DIM_R                                      ~40     !1, 'year'
         50        CONCAT                                           ~41     ~39, ~40
         51        CONCAT                                           ~42     ~41, '+%28'
         52        FETCH_DIM_R                                      ~43     !1, 'country'
         53        CONCAT                                           ~44     ~42, ~43
         54        CONCAT                                           ~45     ~44, '%29'
         55        ASSIGN                                                   !0, ~45
   26    56      > JMP                                                      ->58
   23    57    > > JMP                                                      ->36
         58    >   FE_FREE                                                  $28
   22    59      > JMP                                                      ->34
         60    >   FE_FREE                                                  $27
   30    61        ECHO                                                     !0
         62      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.63 ms | 1390 KiB | 13 Q