3v4l.org

run code in 500+ PHP versions simultaneously
<?php $rows['categorie'] = 6; $options = [1 => "Fiscalité IS", 2 => "Réorganisations, acquisitions et méthodologie", 3 => "Contrôle et contentieux fiscal", 4 => "Fiscalité patrimoniale", 5 => "Fiscalité Immobilière", 6 => "Introduction à la TVA et droits de douanes", 7 => "Excel"]; echo '<select name="categorie" id="cat-select">'; foreach ($options as $optionNo => $optionText) { echo '<option value="' . $optionNo . '"'; if ($optionNo == $rows['categorie']) { echo ' selected'; } echo '>' . $optionText . '</option>'; } echo '</select>'; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 18
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 18
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 14
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/8qdYJ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $rows, !1 = $options, !2 = $optionText, !3 = $optionNo
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN_DIM                                                   !0, 'categorie'
          1        OP_DATA                                                      6
    5     2        ASSIGN                                                       !1, <array>
   12     3        ECHO                                                         '%3Cselect+name%3D%22categorie%22+id%3D%22cat-select%22%3E'
   13     4      > FE_RESET_R                                           $6      !1, ->18
          5    > > FE_FETCH_R                                           ~7      $6, !2, ->18
          6    >   ASSIGN                                                       !3, ~7
   14     7        CONCAT                                               ~9      '%3Coption+value%3D%22', !3
          8        CONCAT                                               ~10     ~9, '%22'
          9        ECHO                                                         ~10
   15    10        FETCH_DIM_R                                          ~11     !0, 'categorie'
         11        IS_EQUAL                                                     !3, ~11
         12      > JMPZ                                                         ~12, ->14
   16    13    >   ECHO                                                         '+selected'
   18    14    >   CONCAT                                               ~13     '%3E', !2
         15        CONCAT                                               ~14     ~13, '%3C%2Foption%3E'
         16        ECHO                                                         ~14
   13    17      > JMP                                                          ->5
         18    >   FE_FREE                                                      $6
   20    19        ECHO                                                         '%3C%2Fselect%3E'
   22    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
210.82 ms | 1958 KiB | 13 Q