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, '#') . '$'; $res = preg_match("#$regex#i", $user_email); print_r($res);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Cvl4S
function name:  (null)
number of ops:  28
compiled vars:  !0 = $user_email, !1 = $allowed_domain, !2 = $matches, !3 = $regex, !4 = $res
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        ASSIGN                                                   !4, $15
   11    24        INIT_FCALL                                               'print_r'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.43 ms | 1395 KiB | 19 Q