3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arrarr = array( array('a' => 0), array('a' => 1, 'b' => 2), array('a' => 2, 'b' => 3, 'c' => 4), array('a' => 3, 'b' => 4, 'c' => 5, 'd' => 6) ); foreach ($arrarr as $row) { foreach ($row as $key => &$value) { if ($key === 'b' || $key === 'd') { $value = 'foo'; } } print(implode(",", $row)); } var_dump($arrarr);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 20
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 20
Branch analysis from position: 3
2 jumps found. (Code = 125) Position 1 = 4, Position 2 = 13
Branch analysis from position: 4
2 jumps found. (Code = 126) Position 1 = 5, Position 2 = 13
Branch analysis from position: 5
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 12
Branch analysis from position: 10
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 13
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/YOYbR
function name:  (null)
number of ops:  25
compiled vars:  !0 = $arrarr, !1 = $row, !2 = $value, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   10     1      > FE_RESET_R                                       $5      !0, ->20
          2    > > FE_FETCH_R                                               $5, !1, ->20
   11     3    > > FE_RESET_RW                                      $6      !1, ->13
          4    > > FE_FETCH_RW                                      ~7      $6, !2, ->13
          5    >   ASSIGN                                                   !3, ~7
   12     6        IS_IDENTICAL                                     ~9      !3, 'b'
          7      > JMPNZ_EX                                         ~9      ~9, ->10
          8    >   IS_IDENTICAL                                     ~10     !3, 'd'
          9        BOOL                                             ~9      ~10
         10    > > JMPZ                                                     ~9, ->12
   13    11    >   ASSIGN                                                   !2, 'foo'
   11    12    > > JMP                                                      ->4
         13    >   FE_FREE                                                  $6
   16    14        INIT_FCALL                                               'implode'
         15        SEND_VAL                                                 '%2C'
         16        SEND_VAR                                                 !1
         17        DO_ICALL                                         $12     
         18        ECHO                                                     $12
   10    19      > JMP                                                      ->2
         20    >   FE_FREE                                                  $5
   19    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !0
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.42 ms | 1388 KiB | 17 Q