3v4l.org

run code in 300+ PHP versions simultaneously
<?php function verifyUsername($x){ if (preg_match('/[^a-z]/i',$x)) { return 0; } else { return 1; } } function verifyEmailAdd($x){ if (!filter_var($x, FILTER_VALIDATE_EMAIL)) { return 0; } else { return 1; } } var_dump(verifyUsername("45wqadf")); var_dump(verifyUsername("wqadf")); var_dump(verifyEmailAdd("45wqadf@&%")); var_dump(verifyEmailAdd("wqadf@blah.com"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVDiK
function name:  (null)
number of ops:  25
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'verifyusername'
          2        SEND_VAL                                                 '45wqadf'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
   23     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'verifyusername'
          8        SEND_VAL                                                 'wqadf'
          9        DO_FCALL                                      0  $2      
         10        SEND_VAR                                                 $2
         11        DO_ICALL                                                 
   24    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'verifyemailadd'
         14        SEND_VAL                                                 '45wqadf%40%26%25'
         15        DO_FCALL                                      0  $4      
         16        SEND_VAR                                                 $4
         17        DO_ICALL                                                 
   25    18        INIT_FCALL                                               'var_dump'
         19        INIT_FCALL                                               'verifyemailadd'
         20        SEND_VAL                                                 'wqadf%40blah.com'
         21        DO_FCALL                                      0  $6      
         22        SEND_VAR                                                 $6
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Function verifyusername:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVDiK
function name:  verifyUsername
number of ops:  10
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5B%5Ea-z%5D%2Fi'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5      > JMPZ                                                     $1, ->8
    5     6    > > RETURN                                                   0
    4     7*       JMP                                                      ->9
    8     8    > > RETURN                                                   1
   10     9*     > RETURN                                                   null

End of function verifyusername

Function verifyemailadd:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kVDiK
function name:  verifyEmailAdd
number of ops:  11
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   RECV                                             !0      
   13     1        INIT_FCALL                                               'filter_var'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 274
          4        DO_ICALL                                         $1      
          5        BOOL_NOT                                         ~2      $1
          6      > JMPZ                                                     ~2, ->9
   14     7    > > RETURN                                                   0
   13     8*       JMP                                                      ->10
   18     9    > > RETURN                                                   1
   20    10*     > RETURN                                                   null

End of function verifyemailadd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.96 ms | 1011 KiB | 20 Q