3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parts = ['hello', 'hi', 'how r u', 'how are you', 'how r you', 'how are u']; $strings = ['Hello', 'Helloooo', 'How r youuuu', 'hell', 'w are y', 'heey hello', 'heeeey hello bro']; $regexp = implode('|', $parts); foreach ($strings as $string) { echo "$string: " . (preg_match("/($regexp)/i", $string) ? "true\n" : "false\n"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 25
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 25
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/uTeub
function name:  (null)
number of ops:  27
compiled vars:  !0 = $parts, !1 = $strings, !2 = $regexp, !3 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    4     2        INIT_FCALL                                               'implode'
          3        SEND_VAL                                                 '%7C'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $6      
          6        ASSIGN                                                   !2, $6
    5     7      > FE_RESET_R                                       $8      !1, ->25
          8    > > FE_FETCH_R                                               $8, !3, ->25
    6     9    >   NOP                                                      
         10        FAST_CONCAT                                      ~9      !3, '%3A+'
         11        INIT_FCALL                                               'preg_match'
         12        ROPE_INIT                                     3  ~11     '%2F%28'
         13        ROPE_ADD                                      1  ~11     ~11, !2
         14        ROPE_END                                      2  ~10     ~11, '%29%2Fi'
         15        SEND_VAL                                                 ~10
         16        SEND_VAR                                                 !3
         17        DO_ICALL                                         $13     
         18      > JMPZ                                                     $13, ->21
         19    >   QM_ASSIGN                                        ~14     'true%0A'
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~14     'false%0A'
         22    >   CONCAT                                           ~15     ~9, ~14
         23        ECHO                                                     ~15
    5    24      > JMP                                                      ->8
         25    >   FE_FREE                                                  $8
    7    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.56 ms | 1401 KiB | 17 Q