3v4l.org

run code in 300+ PHP versions simultaneously
<?php $options = array('blah' => 'bla'); $color = isset($options['color']) ?: ''; echo $color; $color2 = isset($options['color']) ? $options['color'] : ''; echo $color2; $options['color'] = 'blue'; $color = isset($options['color']) ?: ''; echo $color; $color2 = isset($options['color']) ? $options['color'] : ''; echo $color2; echo 'done';
Finding entry points
Branch analysis from position: 0
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
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 23, Position 2 = 26
Branch analysis from position: 23
Branch analysis from position: 26
filename:       /in/oHvsP
function name:  (null)
number of ops:  31
compiled vars:  !0 = $options, !1 = $color, !2 = $color2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ISSET_ISEMPTY_DIM_OBJ                         0  ~4      !0, 'color'
          2        JMP_SET                                          ~5      ~4, ->4
          3        QM_ASSIGN                                        ~5      ''
          4        ASSIGN                                                   !1, ~5
    6     5        ECHO                                                     !1
    8     6        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'color'
          7      > JMPZ                                                     ~7, ->11
          8    >   FETCH_DIM_R                                      ~8      !0, 'color'
          9        QM_ASSIGN                                        ~9      ~8
         10      > JMP                                                      ->12
         11    >   QM_ASSIGN                                        ~9      ''
         12    >   ASSIGN                                                   !2, ~9
    9    13        ECHO                                                     !2
   11    14        ASSIGN_DIM                                               !0, 'color'
         15        OP_DATA                                                  'blue'
   13    16        ISSET_ISEMPTY_DIM_OBJ                         0  ~12     !0, 'color'
         17        JMP_SET                                          ~13     ~12, ->19
         18        QM_ASSIGN                                        ~13     ''
         19        ASSIGN                                                   !1, ~13
   14    20        ECHO                                                     !1
   16    21        ISSET_ISEMPTY_DIM_OBJ                         0          !0, 'color'
         22      > JMPZ                                                     ~15, ->26
         23    >   FETCH_DIM_R                                      ~16     !0, 'color'
         24        QM_ASSIGN                                        ~17     ~16
         25      > JMP                                                      ->27
         26    >   QM_ASSIGN                                        ~17     ''
         27    >   ASSIGN                                                   !2, ~17
   17    28        ECHO                                                     !2
   19    29        ECHO                                                     'done'
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.37 ms | 1395 KiB | 13 Q