3v4l.org

run code in 300+ PHP versions simultaneously
<?php $interests = [ 'seo' => 'SEO и Блоговодство', 'auto' => 'Aвто', 'business' => 'Бизнес', 'design' => 'Дизайн', ]; $selected = 'business'; echo '<select name="interest">'; foreach ($interests as $value => $text) { printf( '<option value="%s"%s>%s</option>', $value, $selected === $value ? ' selected' : '', $text ); } echo '</select>';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 18
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/8ecDR
function name:  (null)
number of ops:  21
compiled vars:  !0 = $interests, !1 = $selected, !2 = $text, !3 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    9     1        ASSIGN                                                   !1, 'business'
   11     2        ECHO                                                     '%3Cselect+name%3D%22interest%22%3E'
   12     3      > FE_RESET_R                                       $6      !0, ->18
          4    > > FE_FETCH_R                                       ~7      $6, !2, ->18
          5    >   ASSIGN                                                   !3, ~7
   13     6        INIT_FCALL                                               'printf'
   14     7        SEND_VAL                                                 '%3Coption+value%3D%22%25s%22%25s%3E%25s%3C%2Foption%3E'
   15     8        SEND_VAR                                                 !3
   16     9        IS_IDENTICAL                                             !1, !3
         10      > JMPZ                                                     ~9, ->13
         11    >   QM_ASSIGN                                        ~10     '+selected'
         12      > JMP                                                      ->14
         13    >   QM_ASSIGN                                        ~10     ''
         14    >   SEND_VAL                                                 ~10
   17    15        SEND_VAR                                                 !2
   13    16        DO_ICALL                                                 
   12    17      > JMP                                                      ->4
         18    >   FE_FREE                                                  $6
   20    19        ECHO                                                     '%3C%2Fselect%3E'
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.41 ms | 1010 KiB | 14 Q