3v4l.org

run code in 300+ PHP versions simultaneously
<?php $user_email = 'asd@toyota.com'; $re_to = "[^@]+@[^@]+"; //"[^@]+@[^@]*toyota[^@]*\.[^@]+"; $re_to = "[.]+"; $regex = preg_quote($re_to, '#') . '$'; $res = preg_match("#$regex#i", $user_email); echo $res ? '1' : '0';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 20
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aSUsG
function name:  (null)
number of ops:  23
compiled vars:  !0 = $user_email, !1 = $re_to, !2 = $regex, !3 = $res
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, 'asd%40toyota.com'
    7     1        ASSIGN                                                   !1, '%5B%5E%40%5D%2B%40%5B%5E%40%5D%2B'
    8     2        ASSIGN                                                   !1, '%5B.%5D%2B'
   10     3        INIT_FCALL                                               'preg_quote'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 '%23'
          6        DO_ICALL                                         $7      
          7        CONCAT                                           ~8      $7, '%24'
          8        ASSIGN                                                   !2, ~8
   12     9        INIT_FCALL                                               'preg_match'
         10        ROPE_INIT                                     3  ~11     '%23'
         11        ROPE_ADD                                      1  ~11     ~11, !2
         12        ROPE_END                                      2  ~10     ~11, '%23i'
         13        SEND_VAL                                                 ~10
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $13     
         16        ASSIGN                                                   !3, $13
   14    17      > JMPZ                                                     !3, ->20
         18    >   QM_ASSIGN                                        ~15     '1'
         19      > JMP                                                      ->21
         20    >   QM_ASSIGN                                        ~15     '0'
         21    >   ECHO                                                     ~15
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.32 ms | 1387 KiB | 17 Q