3v4l.org

run code in 300+ PHP versions simultaneously
<?php foreach(array('100', '1000', '2000', '3000') as $_GET['id']){ if(!isset($_GET['id']) || !in_array($_GET['id'], array('1000', '2000'))){ echo 'not 1k or 2 k' . $_GET['id'] . PHP_EOL; } else { echo 'is 1k or 2k' . $_GET['id'] . PHP_EOL; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 30
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 30
Branch analysis from position: 2
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 17
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 17
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/Q2uao
function name:  (null)
number of ops:  32
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E > > FE_RESET_R                                       $0      <array>, ->30
          1    > > FE_FETCH_R                                               $0, $1, ->30
          2    >   FETCH_W                      global              $2      '_GET'
          3        ASSIGN_DIM                                               $2, 'id'
          4        OP_DATA                                                  $1
    3     5        FETCH_IS                                         ~4      '_GET'
          6        ISSET_ISEMPTY_DIM_OBJ                         0  ~5      ~4, 'id'
          7        BOOL_NOT                                         ~6      ~5
          8      > JMPNZ_EX                                         ~6      ~6, ->17
          9    >   INIT_FCALL                                               'in_array'
         10        FETCH_R                      global              ~7      '_GET'
         11        FETCH_DIM_R                                      ~8      ~7, 'id'
         12        SEND_VAL                                                 ~8
         13        SEND_VAL                                                 <array>
         14        DO_ICALL                                         $9      
         15        BOOL_NOT                                         ~10     $9
         16        BOOL                                             ~6      ~10
         17    > > JMPZ                                                     ~6, ->24
    4    18    >   FETCH_R                      global              ~11     '_GET'
         19        FETCH_DIM_R                                      ~12     ~11, 'id'
         20        CONCAT                                           ~13     'not+1k+or+2+k', ~12
         21        CONCAT                                           ~14     ~13, '%0A'
         22        ECHO                                                     ~14
         23      > JMP                                                      ->29
    6    24    >   FETCH_R                      global              ~15     '_GET'
         25        FETCH_DIM_R                                      ~16     ~15, 'id'
         26        CONCAT                                           ~17     'is+1k+or+2k', ~16
         27        CONCAT                                           ~18     ~17, '%0A'
         28        ECHO                                                     ~18
    2    29    > > JMP                                                      ->1
         30    >   FE_FREE                                                  $0
    8    31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.88 ms | 1400 KiB | 15 Q