3v4l.org

run code in 300+ PHP versions simultaneously
<?php $readJson = [ [ 'id' => 78, 'name' => 'audi', 'sscat_id' => 59, 'date' => '0000-00-00 00:00:00' ], [ 'id' => 106, 'name' => 'apache', 'sscat_id' => 86, 'date' => '0000-00-00 00:00:00' ], [ 'id' => 16, 'name' => 'asia', 'sscat_id' => 62, 'date' => '0000-00-00 00:00:00' ] ]; $_GET['b'] = 16; // test case for echoing one //$_GET['b'] = 99; // test case for echoing all $names = []; foreach ($readJson as $row) { if ($row['id'] === $_GET["b"]) { $names = [$row['name']]; break; } $names[] = $row['name']; } echo implode(', ', $names);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 20
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 20
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 16
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 20
Branch analysis from position: 20
filename:       /in/0NOvL
function name:  (null)
number of ops:  27
compiled vars:  !0 = $readJson, !1 = $names, !2 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   23     1        FETCH_W                      global              $4      '_GET'
          2        ASSIGN_DIM                                               $4, 'b'
          3        OP_DATA                                                  16
   26     4        ASSIGN                                                   !1, <array>
   27     5      > FE_RESET_R                                       $7      !0, ->20
          6    > > FE_FETCH_R                                               $7, !2, ->20
   28     7    >   FETCH_DIM_R                                      ~8      !2, 'id'
          8        FETCH_R                      global              ~9      '_GET'
          9        FETCH_DIM_R                                      ~10     ~9, 'b'
         10        IS_IDENTICAL                                             ~8, ~10
         11      > JMPZ                                                     ~11, ->16
   29    12    >   FETCH_DIM_R                                      ~12     !2, 'name'
         13        INIT_ARRAY                                       ~13     ~12
         14        ASSIGN                                                   !1, ~13
   30    15      > JMP                                                      ->20
   32    16    >   FETCH_DIM_R                                      ~16     !2, 'name'
         17        ASSIGN_DIM                                               !1
         18        OP_DATA                                                  ~16
   27    19      > JMP                                                      ->6
         20    >   FE_FREE                                                  $7
   34    21        INIT_FCALL                                               'implode'
         22        SEND_VAL                                                 '%2C+'
         23        SEND_VAR                                                 !1
         24        DO_ICALL                                         $17     
         25        ECHO                                                     $17
         26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.43 ms | 1011 KiB | 14 Q