3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user_email = "dbutt@westminstertoyota.com"; $allowed_domain = '/^[^@]+@[^@]*toyota[^@]*\.[^@]+/'; preg_match($allowed_domain, $user_email, $matches); print_r($matches); $regex = preg_quote($allowed_domain, '#') . '$'; if (preg_match("#$regex#i", $user_email) or preg_match($pattern, $allowed_domain)) { echo 'True'; }else{ echo 'False'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/qgFRo
function name:  (null)
number of ops:  34
compiled vars:  !0 = $user_email, !1 = $allowed_domain, !2 = $matches, !3 = $regex, !4 = $pattern
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'dbutt%40westminstertoyota.com'
    3     1        ASSIGN                                                   !1, '%2F%5E%5B%5E%40%5D%2B%40%5B%5E%40%5D%2Atoyota%5B%5E%40%5D%2A%5C.%5B%5E%40%5D%2B%2F'
    6     2        INIT_FCALL                                               'preg_match'
          3        SEND_VAR                                                 !1
          4        SEND_VAR                                                 !0
          5        SEND_REF                                                 !2
          6        DO_ICALL                                                 
    7     7        INIT_FCALL                                               'print_r'
          8        SEND_VAR                                                 !2
          9        DO_ICALL                                                 
    9    10        INIT_FCALL                                               'preg_quote'
         11        SEND_VAR                                                 !1
         12        SEND_VAL                                                 '%23'
         13        DO_ICALL                                         $9      
         14        CONCAT                                           ~10     $9, '%24'
         15        ASSIGN                                                   !3, ~10
   10    16        INIT_FCALL                                               'preg_match'
         17        ROPE_INIT                                     3  ~13     '%23'
         18        ROPE_ADD                                      1  ~13     ~13, !3
         19        ROPE_END                                      2  ~12     ~13, '%23i'
         20        SEND_VAL                                                 ~12
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $15     
         23      > JMPNZ_EX                                         ~16     $15, ->29
         24    >   INIT_FCALL                                               'preg_match'
         25        SEND_VAR                                                 !4
         26        SEND_VAR                                                 !1
         27        DO_ICALL                                         $17     
         28        BOOL                                             ~16     $17
         29    > > JMPZ                                                     ~16, ->32
   12    30    >   ECHO                                                     'True'
         31      > JMP                                                      ->33
   14    32    >   ECHO                                                     'False'
   15    33    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.25 ms | 1396 KiB | 19 Q