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 = 'Loz Unezie'; if ((empty($author)) && (!empty($author_email))) { $_try_author = $author_email; if (strpos($_try_author, '@') !== false) { echo "valid email detected\n"; //$_try_author = trim(preg_replace($_email_pattern, '', $_try_author)); //var_dump($_try_author); $_try_author = trim(preg_replace('#[<()>\[\]._%+-]#',' ',$_try_author)); var_dump($_try_author); } else { echo "invalid email detected\n"; $author_email = ''; // not a valid email } $author = $_try_author; } $author = trim(preg_replace('#(x[a-f,0-9]{3})+#i', '', $author)); //$this->postinfo['author'] = trim(preg_replace(array('#[\/&]#', '#[\?\=]#', '|[^0-9,-]|'), array(' ', '', ''), ab_utf8_fixup($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 = 33
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 30
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
Branch analysis from position: 8
filename:       /in/Wc2OK
function name:  (null)
number of ops:  49
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, 'Loz+Unezie'
    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, ->33
    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, ->30
    9    16    >   ECHO                                                     'valid+email+detected%0A'
   12    17        INIT_FCALL                                               'trim'
         18        INIT_FCALL                                               'preg_replace'
         19        SEND_VAL                                                 '%23%5B%3C%28%29%3E%5C%5B%5C%5D._%25%2B-%5D%23'
         20        SEND_VAL                                                 '+'
         21        SEND_VAR                                                 !3
         22        DO_ICALL                                         $13     
         23        SEND_VAR                                                 $13
         24        DO_ICALL                                         $14     
         25        ASSIGN                                                   !3, $14
   13    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                                 
         29      > JMP                                                      ->32
   15    30    >   ECHO                                                     'invalid+email+detected%0A'
   16    31        ASSIGN                                                   !2, ''
   18    32    >   ASSIGN                                                   !1, !3
   21    33    >   INIT_FCALL                                               'trim'
         34        INIT_FCALL                                               'preg_replace'
         35        SEND_VAL                                                 '%23%28x%5Ba-f%2C0-9%5D%7B3%7D%29%2B%23i'
         36        SEND_VAL                                                 ''
         37        SEND_VAR                                                 !1
         38        DO_ICALL                                         $19     
         39        SEND_VAR                                                 $19
         40        DO_ICALL                                         $20     
         41        ASSIGN                                                   !1, $20
   23    42        CONCAT                                           ~22     'AUTHOR%3A+', !1
         43        CONCAT                                           ~23     ~22, '%0A'
         44        ECHO                                                     ~23
   24    45        CONCAT                                           ~24     'AUTHOR+EMAIL%3A+', !2
         46        CONCAT                                           ~25     ~24, '%0A'
         47        ECHO                                                     ~25
         48      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
185.16 ms | 1400 KiB | 21 Q