3v4l.org

run code in 300+ PHP versions simultaneously
<?php $toks = [ '\bwaiting\b', '^\w+', '\bresponse\b', '\bfrom\b', '\|', '\bto\b', ]; $pattern = '/' . implode('|', $toks) . '/i'; var_export(preg_match_all($pattern, "I'm waiting for a response from", $out) ? $out[0] : null);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/knAE5
function name:  (null)
number of ops:  22
compiled vars:  !0 = $toks, !1 = $pattern, !2 = $out
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%7C'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        CONCAT                                           ~5      '%2F', $4
          6        CONCAT                                           ~6      ~5, '%2Fi'
          7        ASSIGN                                                   !1, ~6
   12     8        INIT_FCALL                                               'var_export'
          9        INIT_FCALL                                               'preg_match_all'
         10        SEND_VAR                                                 !1
         11        SEND_VAL                                                 'I%27m+waiting+for+a+response+from'
         12        SEND_REF                                                 !2
         13        DO_ICALL                                         $8      
         14      > JMPZ                                                     $8, ->18
         15    >   FETCH_DIM_R                                      ~9      !2, 0
         16        QM_ASSIGN                                        ~10     ~9
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~10     null
         19    >   SEND_VAL                                                 ~10
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.35 ms | 1395 KiB | 19 Q