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 = 58
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 58
Branch analysis from position: 35
2 jumps found. (Code = 77) Position 1 = 36, Position 2 = 56
Branch analysis from position: 36
2 jumps found. (Code = 78) Position 1 = 37, Position 2 = 56
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 42, Position 2 = 55
Branch analysis from position: 42
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 55
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
Branch analysis from position: 56
Branch analysis from position: 56
Branch analysis from position: 58
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 58
filename:       /in/8KjfI
function name:  (null)
number of ops:  61
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, ->58
         34    > > FE_FETCH_R                                               $27, !1, ->58
   23    35    > > FE_RESET_R                                       $28     !1, ->56
         36    > > FE_FETCH_R                                               $28, $29, ->56
         37    >   ASSIGN_DIM                                               !2, 'country'
         38        OP_DATA                                                  $29
   24    39        FETCH_DIM_R                                      ~31     !2, 'country'
         40        IS_EQUAL                                                 ~31, 'USA'
         41      > JMPZ                                                     ~32, ->55
   25    42    >   FETCH_DIM_R                                      ~33     !1, 'day'
         43        CONCAT                                           ~34     ~33, '+'
         44        FETCH_DIM_R                                      ~35     !1, 'month'
         45        CONCAT                                           ~36     ~34, ~35
         46        CONCAT                                           ~37     ~36, '+'
         47        FETCH_DIM_R                                      ~38     !1, 'year'
         48        CONCAT                                           ~39     ~37, ~38
         49        CONCAT                                           ~40     ~39, '+%28'
         50        FETCH_DIM_R                                      ~41     !1, 'country'
         51        CONCAT                                           ~42     ~40, ~41
         52        CONCAT                                           ~43     ~42, '%29'
         53        ASSIGN                                                   !0, ~43
   26    54      > JMP                                                      ->56
   23    55    > > JMP                                                      ->36
         56    >   FE_FREE                                                  $28
   22    57      > JMP                                                      ->34
         58    >   FE_FREE                                                  $27
   30    59        ECHO                                                     !0
         60      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.48 ms | 1390 KiB | 13 Q