3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ ['email' => 'a@a.com', 'name' => 'a'], ['email' => 'b@b.com', 'name' => 'b'], ]; $needle = 'a@a.com'; $name = null; foreach ($array as $row) { if ($row['email'] === $needle) { $name = $row['name']; break; } } var_export($name);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 12
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 12
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 11
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
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: 12
filename:       /in/EB4hX
function name:  (null)
number of ops:  17
compiled vars:  !0 = $array, !1 = $needle, !2 = $name, !3 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 'a%40a.com'
   10     2        ASSIGN                                                   !2, null
   11     3      > FE_RESET_R                                       $7      !0, ->12
          4    > > FE_FETCH_R                                               $7, !3, ->12
   12     5    >   FETCH_DIM_R                                      ~8      !3, 'email'
          6        IS_IDENTICAL                                             !1, ~8
          7      > JMPZ                                                     ~9, ->11
   13     8    >   FETCH_DIM_R                                      ~10     !3, 'name'
          9        ASSIGN                                                   !2, ~10
   14    10      > JMP                                                      ->12
   11    11    > > JMP                                                      ->4
         12    >   FE_FREE                                                  $7
   17    13        INIT_FCALL                                               'var_export'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.06 ms | 1004 KiB | 14 Q