3v4l.org

run code in 300+ PHP versions simultaneously
<?php $email = "a-b.b@c.d"; $err = []; if (!empty($email) && !preg_match('/^[\w-]+(?:\.[\w-]+)*@[\w-]+(?:\.[a-z0-9-]+)*\.[a-z]{1,12}$/i', $email)){ $err[] = "Invalid email<br>"; } var_dump($err);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 11
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 11
filename:       /in/tPVQ7
function name:  (null)
number of ops:  18
compiled vars:  !0 = $email, !1 = $err
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'a-b.b%40c.d'
    4     1        ASSIGN                                                   !1, <array>
    6     2        ISSET_ISEMPTY_CV                                 ~4      !0
          3        BOOL_NOT                                         ~5      ~4
          4      > JMPZ_EX                                          ~5      ~5, ->11
          5    >   INIT_FCALL                                               'preg_match'
          6        SEND_VAL                                                 '%2F%5E%5B%5Cw-%5D%2B%28%3F%3A%5C.%5B%5Cw-%5D%2B%29%2A%40%5B%5Cw-%5D%2B%28%3F%3A%5C.%5Ba-z0-9-%5D%2B%29%2A%5C.%5Ba-z%5D%7B1%2C12%7D%24%2Fi'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        BOOL_NOT                                         ~7      $6
         10        BOOL                                             ~5      ~7
         11    > > JMPZ                                                     ~5, ->14
    7    12    >   ASSIGN_DIM                                               !1
         13        OP_DATA                                                  'Invalid+email%3Cbr%3E'
   10    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.65 ms | 1433 KiB | 15 Q