3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_email_pattern = '#[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,6}#i'; $author = ''; $author_email = 'jack johnson'; if ((empty($author)) && (!empty($author_email))) { $_try_author = $author_email; if (strpos($_try_author, '@') !== false) { $_try_author = trim(preg_replace($_email_pattern, '', $_try_author)); $_try_author = trim(preg_replace('#[<()>\[\]._%+-]#',' ',$_try_author)); } else { $author_email = ''; // not a valid email } $author = $_try_author; } echo 'AUTHOR: '.$author."\n"; echo 'AUTHOR EMAIL: '.$author_email."\n";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 37
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 35
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 36
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 37
Branch analysis from position: 8
filename:       /in/qksoY
function name:  (null)
number of ops:  44
compiled vars:  !0 = $_email_pattern, !1 = $author, !2 = $author_email, !3 = $_try_author
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%23%5BA-Z0-9._%25%2B-%5D%2B%40%5BA-Z0-9.-%5D%2B%5C.%5BA-Z%5D%7B2%2C6%7D%23i'
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 'jack+johnson'
    6     3        ISSET_ISEMPTY_CV                                 ~7      !1
          4      > JMPZ_EX                                          ~7      ~7, ->8
          5    >   ISSET_ISEMPTY_CV                                 ~8      !2
          6        BOOL_NOT                                         ~9      ~8
          7        BOOL                                             ~7      ~9
          8    > > JMPZ                                                     ~7, ->37
    7     9    >   ASSIGN                                                   !3, !2
    8    10        INIT_FCALL                                               'strpos'
         11        SEND_VAR                                                 !3
         12        SEND_VAL                                                 '%40'
         13        DO_ICALL                                         $11     
         14        TYPE_CHECK                                  1018          $11
         15      > JMPZ                                                     ~12, ->35
    9    16    >   INIT_FCALL                                               'trim'
         17        INIT_FCALL                                               'preg_replace'
         18        SEND_VAR                                                 !0
         19        SEND_VAL                                                 ''
         20        SEND_VAR                                                 !3
         21        DO_ICALL                                         $13     
         22        SEND_VAR                                                 $13
         23        DO_ICALL                                         $14     
         24        ASSIGN                                                   !3, $14
   10    25        INIT_FCALL                                               'trim'
         26        INIT_FCALL                                               'preg_replace'
         27        SEND_VAL                                                 '%23%5B%3C%28%29%3E%5C%5B%5C%5D._%25%2B-%5D%23'
         28        SEND_VAL                                                 '+'
         29        SEND_VAR                                                 !3
         30        DO_ICALL                                         $16     
         31        SEND_VAR                                                 $16
         32        DO_ICALL                                         $17     
         33        ASSIGN                                                   !3, $17
         34      > JMP                                                      ->36
   12    35    >   ASSIGN                                                   !2, ''
   14    36    >   ASSIGN                                                   !1, !3
   16    37    >   CONCAT                                           ~21     'AUTHOR%3A+', !1
         38        CONCAT                                           ~22     ~21, '%0A'
         39        ECHO                                                     ~22
   17    40        CONCAT                                           ~23     'AUTHOR+EMAIL%3A+', !2
         41        CONCAT                                           ~24     ~23, '%0A'
         42        ECHO                                                     ~24
         43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.17 ms | 1400 KiB | 19 Q