3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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($allowed_domain, $user_email)) { echo 'True'; }else{ echo 'False'; }
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 24, Position 2 = 29
Branch analysis from position: 24
Jump found. Position 1 = 30, Position 2 = 32
Branch analysis from position: 30
Jump found. Position 1 = 33
Branch analysis from position: 33
Jump found. Position 1 = -2
Branch analysis from position: 32
Jump found. Position 1 = -2
Branch analysis from position: 29
filename:       /in/IXn3t
function name:  (null)
number of ops:  34
compiled vars:  !0 = $user_email, !1 = $allowed_domain, !2 = $matches, !3 = $regex
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                                         $8      
        14        CONCAT                                           ~9      $8, '%24'
        15        ASSIGN                                                   !3, ~9
  10    16        INIT_FCALL                                               'preg_match'
        17        ROPE_INIT                                     3  ~12     '%23'
        18        ROPE_ADD                                      1  ~12     ~12, !3
        19        ROPE_END                                      2  ~11     ~12, '%23i'
        20        SEND_VAL                                                 ~11
        21        SEND_VAR                                                 !0
        22        DO_ICALL                                         $14     
        23      > JMPNZ_EX                                         ~15     $14, ->29
        24    >   INIT_FCALL                                               'preg_match'
        25        SEND_VAR                                                 !1
        26        SEND_VAR                                                 !0
        27        DO_ICALL                                         $16     
        28        BOOL                                             ~15     $16
        29    > > JMPZ                                                     ~15, ->32
  12    30    >   ECHO                                                     'True'
        31      > JMP                                                      ->33
  14    32    >   ECHO                                                     'False'
        33    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0