3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_SESSION["cart_item"] = array('1', '2', '3'); $_GET['code'] = '3'; if(isset($_SESSION["cart_item"])) { if(in_array($_GET['code'], $_SESSION["cart_item"])){ echo "hiiii"; }else{ echo "byeee";} }else { $itemArray = array( $_GET['code'] => array('pcode'=> $_GET['code']) ); $_SESSION["cart_item"] = $itemArray; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 22
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gmu7k
function name:  (null)
number of ops:  33
compiled vars:  !0 = $itemArray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   FETCH_W                      global              $1      '_SESSION'
          1        ASSIGN_DIM                                               $1, 'cart_item'
          2        OP_DATA                                                  <array>
    4     3        FETCH_W                      global              $3      '_GET'
          4        ASSIGN_DIM                                               $3, 'code'
          5        OP_DATA                                                  '3'
    6     6        FETCH_IS                                         ~5      '_SESSION'
          7        ISSET_ISEMPTY_DIM_OBJ                         0          ~5, 'cart_item'
          8      > JMPZ                                                     ~6, ->22
    7     9    >   INIT_FCALL                                               'in_array'
         10        FETCH_R                      global              ~7      '_GET'
         11        FETCH_DIM_R                                      ~8      ~7, 'code'
         12        SEND_VAL                                                 ~8
         13        FETCH_R                      global              ~9      '_SESSION'
         14        FETCH_DIM_R                                      ~10     ~9, 'cart_item'
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                         $11     
         17      > JMPZ                                                     $11, ->20
    8    18    >   ECHO                                                     'hiiii'
    7    19      > JMP                                                      ->21
   10    20    >   ECHO                                                     'byeee'
    6    21    > > JMP                                                      ->32
   12    22    >   FETCH_R                      global              ~12     '_GET'
         23        FETCH_DIM_R                                      ~13     ~12, 'code'
         24        FETCH_R                      global              ~14     '_GET'
         25        FETCH_DIM_R                                      ~15     ~14, 'code'
         26        INIT_ARRAY                                       ~16     ~15, 'pcode'
         27        INIT_ARRAY                                       ~17     ~16, ~13
         28        ASSIGN                                                   !0, ~17
   13    29        FETCH_W                      global              $19     '_SESSION'
         30        ASSIGN_DIM                                               $19, 'cart_item'
         31        OP_DATA                                                  !0
   14    32    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.47 ms | 1452 KiB | 14 Q