3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'this is a string'; // Test 1 if (isset($string['check'][0])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; // Test 2 if (isset($string[0])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; // Test 3 if (isset($string['check'])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; // Test 4 if (isset($string['check'][100])) { echo 'found'; } else { echo 'not found'; } echo '<hr />'; var_dump($string['check'][0]); // Warning throw out
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 25
Branch analysis from position: 23
Branch analysis from position: 25
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
Branch analysis from position: 12
filename:       /in/Rkuvv
function name:  (null)
number of ops:  33
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'this+is+a+string'
    6     1        FETCH_DIM_IS                                     ~2      !0, 'check'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~2, 0
          3      > JMPZ                                                     ~3, ->6
    7     4    >   ECHO                                                     'found'
          5      > JMP                                                      ->7
    9     6    >   ECHO                                                     'not+found'
   12     7    >   ECHO                                                     '%3Chr+%2F%3E'
   15     8        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 0
          9      > JMPZ                                                     ~4, ->12
   16    10    >   ECHO                                                     'found'
         11      > JMP                                                      ->13
   18    12    >   ECHO                                                     'not+found'
   21    13    >   ECHO                                                     '%3Chr+%2F%3E'
   24    14        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'check'
         15      > JMPZ                                                     ~5, ->18
   25    16    >   ECHO                                                     'found'
         17      > JMP                                                      ->19
   27    18    >   ECHO                                                     'not+found'
   30    19    >   ECHO                                                     '%3Chr+%2F%3E'
   33    20        FETCH_DIM_IS                                     ~6      !0, 'check'
         21        ISSET_ISEMPTY_DIM_OBJ                         0          ~6, 100
         22      > JMPZ                                                     ~7, ->25
   34    23    >   ECHO                                                     'found'
         24      > JMP                                                      ->26
   36    25    >   ECHO                                                     'not+found'
   39    26    >   ECHO                                                     '%3Chr+%2F%3E'
   41    27        INIT_FCALL                                               'var_dump'
         28        FETCH_DIM_R                                      ~8      !0, 'check'
         29        FETCH_DIM_R                                      ~9      ~8, 0
         30        SEND_VAL                                                 ~9
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.16 ms | 1392 KiB | 15 Q