3v4l.org

run code in 500+ PHP versions simultaneously
<?php $array = array( 'text 1 2 and 3 text', 'text 3 9 25 text', 'text 9 25 48 text', ); foreach ($array as $color) { echo "\n---\n$color"; echo "\n\t" , preg_match('~\b[1-8]\b~', $color, $out) ? "checked (satisfied by {$out[0]})" : 'not found'; echo "\n\tChad says: " , (strpos($color,'1') || strpos($color,'2') || strpos($color,'3') || strpos($color,'4') || strpos($color,'5') || strpos($color,'6') || strpos($color,'7') || strpos($color,'8') ? 'found' : 'not found'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 50
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 50
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 19
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
2 jumps found. (Code = 47) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
2 jumps found. (Code = 47) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
2 jumps found. (Code = 47) Position 1 = 33, Position 2 = 35
Branch analysis from position: 33
2 jumps found. (Code = 47) Position 1 = 36, Position 2 = 38
Branch analysis from position: 36
2 jumps found. (Code = 47) Position 1 = 39, Position 2 = 41
Branch analysis from position: 39
2 jumps found. (Code = 47) Position 1 = 42, Position 2 = 44
Branch analysis from position: 42
2 jumps found. (Code = 43) Position 1 = 45, Position 2 = 47
Branch analysis from position: 45
1 jumps found. (Code = 42) Position 1 = 48
Branch analysis from position: 48
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 44
Branch analysis from position: 41
Branch analysis from position: 38
Branch analysis from position: 35
Branch analysis from position: 32
Branch analysis from position: 29
Branch analysis from position: 26
Branch analysis from position: 19
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 26
Branch analysis from position: 24
Branch analysis from position: 26
Branch analysis from position: 50
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 50
filename:       /in/rNL8R
function name:  (null)
number of ops:  52
compiled vars:  !0 = $array, !1 = $color, !2 = $out
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    9     1      > FE_RESET_R                                           $4      !0, ->50
          2    > > FE_FETCH_R                                                   $4, !1, ->50
   10     3    >   NOP                                                          
          4        FAST_CONCAT                                          ~5      '%0A---%0A', !1
          5        ECHO                                                         ~5
   11     6        ECHO                                                         '%0A%09'
          7        INIT_FCALL                                                   'preg_match'
          8        SEND_VAL                                                     '%7E%5Cb%5B1-8%5D%5Cb%7E'
          9        SEND_VAR                                                     !1
         10        SEND_REF                                                     !2
         11        DO_ICALL                                             $6      
         12      > JMPZ                                                         $6, ->19
         13    >   ROPE_INIT                                         3  ~9      'checked+%28satisfied+by+'
         14        FETCH_DIM_R                                          ~7      !2, 0
         15        ROPE_ADD                                          1  ~9      ~9, ~7
         16        ROPE_END                                          2  ~8      ~9, '%29'
         17        QM_ASSIGN                                            ~11     ~8
         18      > JMP                                                          ->20
         19    >   QM_ASSIGN                                            ~11     'not+found'
         20    >   ECHO                                                         ~11
   12    21        ECHO                                                         '%0A%09Chad+says%3A+'
         22        FRAMELESS_ICALL_2                strpos              ~12     !1, '1'
         23      > JMPNZ_EX                                             ~12     ~12, ->26
         24    >   FRAMELESS_ICALL_2                strpos              ~13     !1, '2'
         25        BOOL                                                 ~12     ~13
         26    > > JMPNZ_EX                                             ~12     ~12, ->29
         27    >   FRAMELESS_ICALL_2                strpos              ~14     !1, '3'
         28        BOOL                                                 ~12     ~14
         29    > > JMPNZ_EX                                             ~12     ~12, ->32
         30    >   FRAMELESS_ICALL_2                strpos              ~15     !1, '4'
         31        BOOL                                                 ~12     ~15
         32    > > JMPNZ_EX                                             ~12     ~12, ->35
         33    >   FRAMELESS_ICALL_2                strpos              ~16     !1, '5'
         34        BOOL                                                 ~12     ~16
         35    > > JMPNZ_EX                                             ~12     ~12, ->38
         36    >   FRAMELESS_ICALL_2                strpos              ~17     !1, '6'
         37        BOOL                                                 ~12     ~17
         38    > > JMPNZ_EX                                             ~12     ~12, ->41
         39    >   FRAMELESS_ICALL_2                strpos              ~18     !1, '7'
         40        BOOL                                                 ~12     ~18
         41    > > JMPNZ_EX                                             ~12     ~12, ->44
         42    >   FRAMELESS_ICALL_2                strpos              ~19     !1, '8'
         43        BOOL                                                 ~12     ~19
         44    > > JMPZ                                                         ~12, ->47
         45    >   QM_ASSIGN                                            ~20     'found'
         46      > JMP                                                          ->48
         47    >   QM_ASSIGN                                            ~20     'not+found'
         48    >   ECHO                                                         ~20
    9    49      > JMP                                                          ->2
         50    >   FE_FREE                                                      $4
   13    51      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
179.81 ms | 2336 KiB | 16 Q