3v4l.org

run code in 500+ PHP versions simultaneously
<?php $tallas = '#^(?:' . implode('|', array("XL", "L", "M", "S", "XS")) . ')(?!\S)#i'; $variablenames = [ "Marron", "m", "M" ]; foreach ($variablenames as $variablename) { if (preg_match($tallas, $variablename, $matchesatr)) { $opciones = "Tallas"; } else { $opciones = "Opciones"; } echo $opciones . PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 19
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/hmFFr
function name:  (null)
number of ops:  21
compiled vars:  !0 = $tallas, !1 = $variablenames, !2 = $variablename, !3 = $matchesatr, !4 = $opciones
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   FRAMELESS_ICALL_2                implode             ~5      '%7C', <array>
          1        CONCAT                                               ~6      '%23%5E%28%3F%3A', ~5
          2        CONCAT                                               ~7      ~6, '%29%28%3F%21%5CS%29%23i'
          3        ASSIGN                                                       !0, ~7
    5     4        ASSIGN                                                       !1, <array>
   11     5      > FE_RESET_R                                           $10     !1, ->19
          6    > > FE_FETCH_R                                                   $10, !2, ->19
   12     7    >   INIT_FCALL                                                   'preg_match'
          8        SEND_VAR                                                     !0
          9        SEND_VAR                                                     !2
         10        SEND_REF                                                     !3
         11        DO_ICALL                                             $11     
         12      > JMPZ                                                         $11, ->15
   13    13    >   ASSIGN                                                       !4, 'Tallas'
   12    14      > JMP                                                          ->16
   15    15    >   ASSIGN                                                       !4, 'Opciones'
   17    16    >   CONCAT                                               ~14     !4, '%0A'
         17        ECHO                                                         ~14
   11    18      > JMP                                                          ->6
         19    >   FE_FREE                                                      $10
   18    20      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
162.23 ms | 1881 KiB | 14 Q