3v4l.org

run code in 300+ PHP versions simultaneously
<?php $description = array('Time: 08:00 AM - 09:00 PM Type of Ensemble: Dueling Pianos No. of Players: 2 Additional Musicians: Yes Wedding Ceremony: Yes Cocktail Music: Yes Dinner Music: Yes Evening Entertainment: Yes DJ Services: Yes Shells: Full Projector: Yes Uplights: Yes'); $options = array( 'Shells: Full' => '<img src="https://www.example.com/wp-content/uploads/2021/01/full-shells-icon.png" title="Full Shells" />', 'Uplights: Yes' => '<img src="https://www.example.com/wp-content/uploads/2021/01/uplights-icon.png" title="Uplights" />', 'Projector: Yes' => '<img src="https://www.example.com/wp-content/uploads/2021/01/projector-icon.png" title="Projector" />', 'Wedding Ceremony: Yes' => '<img src="https://www.example.com/wp-content/uploads/2021/01/wedding-ceremony-icon.png" title="Wedding Ceremony" />', 'Additional Musicians: Yes' => '<img src="https://www.example.com/wp-content/uploads/2021/01/extra_musicians_icon.png" title="Additional Musicians" />' ); foreach ($options as $option => $icon) { if (strpos($description[0], $option) !== false) { echo $icon; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 14
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 14
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 13
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/fu90J
function name:  (null)
number of ops:  16
compiled vars:  !0 = $description, !1 = $options, !2 = $icon, !3 = $option
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
   13     2      > FE_RESET_R                                       $6      !1, ->14
          3    > > FE_FETCH_R                                       ~7      $6, !2, ->14
          4    >   ASSIGN                                                   !3, ~7
   14     5        INIT_FCALL                                               'strpos'
          6        FETCH_DIM_R                                      ~9      !0, 0
          7        SEND_VAL                                                 ~9
          8        SEND_VAR                                                 !3
          9        DO_ICALL                                         $10     
         10        TYPE_CHECK                                  1018          $10
         11      > JMPZ                                                     ~11, ->13
   15    12    >   ECHO                                                     !2
   13    13    > > JMP                                                      ->3
         14    >   FE_FREE                                                  $6
   17    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.47 ms | 1010 KiB | 14 Q