3v4l.org

run code in 300+ PHP versions simultaneously
<?php //example data from db: $user = ['store_id' => '99', 'store_name' => 'konrados']; //easier way to output it: echo "<option value = '{$user['store_id']}'>{$user['store_name']}</option>"; // easier easier way ?> <option value="<?= $user['store_id'] ?>"><?= $user['store_name'] ?></option> <?php // easier easier way with no XSS risk ?> <option value="<?= (int) $user['store_id'] ?>"><?= htmlspecialchars($user['store_name']) ?></option>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sr3oe
function name:  (null)
number of ops:  28
compiled vars:  !0 = $user
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ROPE_INIT                                     5  ~5      '%3Coption+value+%3D+%27'
          2        FETCH_DIM_R                                      ~2      !0, 'store_id'
          3        ROPE_ADD                                      1  ~5      ~5, ~2
          4        ROPE_ADD                                      2  ~5      ~5, '%27%3E'
          5        FETCH_DIM_R                                      ~3      !0, 'store_name'
          6        ROPE_ADD                                      3  ~5      ~5, ~3
          7        ROPE_END                                      4  ~4      ~5, '%3C%2Foption%3E'
          8        ECHO                                                     ~4
    9     9        ECHO                                                     '%0A%0A%3Coption+value%3D%22'
   11    10        FETCH_DIM_R                                      ~8      !0, 'store_id'
         11        ECHO                                                     ~8
         12        ECHO                                                     '%22%3E'
         13        FETCH_DIM_R                                      ~9      !0, 'store_name'
         14        ECHO                                                     ~9
         15        ECHO                                                     '%3C%2Foption%3E%0A%0A'
   17    16        ECHO                                                     '%3Coption+value%3D%22'
         17        FETCH_DIM_R                                      ~10     !0, 'store_id'
         18        CAST                                          4  ~11     ~10
         19        ECHO                                                     ~11
         20        ECHO                                                     '%22%3E'
         21        INIT_FCALL                                               'htmlspecialchars'
         22        FETCH_DIM_R                                      ~12     !0, 'store_name'
         23        SEND_VAL                                                 ~12
         24        DO_ICALL                                         $13     
         25        ECHO                                                     $13
         26        ECHO                                                     '%3C%2Foption%3E'
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.54 ms | 1451 KiB | 14 Q