3v4l.org

run code in 500+ PHP versions simultaneously
<?php function emptyInputSignup($name, $email, $username, $pwd, $pwdrepeat) { if (empty($name) || empty($email) || empty($username) || empty($pwd) || empty($pwdrepeat) ) { $result = true ; } else { $result = false; } return $result; } function invalidUid($username) { if (!preg_match("/^[a-zA-Z0-9]*$/", $username)) { $result = true ; } else { $result = false; } return $result; } $test = emptyInputSignup("John Debry", "email@example.com", "johny", "Qwerty123%", "Qwerty123%"); var_dump($test); var_dump(invalidUid('johny')); var_dump(emptyInputSignup('', '', '', '', '')); var_dump(invalidUid('')); // should be TRUE - not OK function invalidUid_($username) { $result = true; if (preg_match("/^[a-zA-Z0-9]+$/", $username)) { $result = false ; } return $result; } var_dump(invalidUid_('')); // should be TRUE - OK ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gV0gn
function name:  (null)
number of ops:  40
compiled vars:  !0 = $test
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   23     0  E >   INIT_FCALL                                                   'emptyinputsignup'
          1        SEND_VAL                                                     'John+Debry'
          2        SEND_VAL                                                     'email%40example.com'
          3        SEND_VAL                                                     'johny'
          4        SEND_VAL                                                     'Qwerty123%25'
          5        SEND_VAL                                                     'Qwerty123%25'
          6        DO_FCALL                                          0  $1      
          7        ASSIGN                                                       !0, $1
   24     8        INIT_FCALL                                                   'var_dump'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
   26    11        INIT_FCALL                                                   'var_dump'
         12        INIT_FCALL                                                   'invaliduid'
         13        SEND_VAL                                                     'johny'
         14        DO_FCALL                                          0  $4      
         15        SEND_VAR                                                     $4
         16        DO_ICALL                                                     
   28    17        INIT_FCALL                                                   'var_dump'
         18        INIT_FCALL                                                   'emptyinputsignup'
         19        SEND_VAL                                                     ''
         20        SEND_VAL                                                     ''
         21        SEND_VAL                                                     ''
         22        SEND_VAL                                                     ''
         23        SEND_VAL                                                     ''
         24        DO_FCALL                                          0  $6      
         25        SEND_VAR                                                     $6
         26        DO_ICALL                                                     
   29    27        INIT_FCALL                                                   'var_dump'
         28        INIT_FCALL                                                   'invaliduid'
         29        SEND_VAL                                                     ''
         30        DO_FCALL                                          0  $8      
         31        SEND_VAR                                                     $8
         32        DO_ICALL                                                     
   39    33        INIT_FCALL                                                   'var_dump'
         34        INIT_FCALL                                                   'invaliduid_'
         35        SEND_VAL                                                     ''
         36        DO_FCALL                                          0  $10     
         37        SEND_VAR                                                     $10
         38        DO_ICALL                                                     
   41    39      > RETURN                                                       1

Function emptyinputsignup:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 47) Position 1 = 13, Position 2 = 15
Branch analysis from position: 13
2 jumps found. (Code = 47) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 15
Branch analysis from position: 12
Branch analysis from position: 9
filename:       /in/gV0gn
function name:  emptyInputSignup
number of ops:  24
compiled vars:  !0 = $name, !1 = $email, !2 = $username, !3 = $pwd, !4 = $pwdrepeat, !5 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        RECV                                                 !2      
          3        RECV                                                 !3      
          4        RECV                                                 !4      
    4     5        ISSET_ISEMPTY_CV                                     ~6      !0
          6      > JMPNZ_EX                                             ~6      ~6, ->9
          7    >   ISSET_ISEMPTY_CV                                     ~7      !1
          8        BOOL                                                 ~6      ~7
          9    > > JMPNZ_EX                                             ~6      ~6, ->12
         10    >   ISSET_ISEMPTY_CV                                     ~8      !2
         11        BOOL                                                 ~6      ~8
         12    > > JMPNZ_EX                                             ~6      ~6, ->15
         13    >   ISSET_ISEMPTY_CV                                     ~9      !3
         14        BOOL                                                 ~6      ~9
         15    > > JMPNZ_EX                                             ~6      ~6, ->18
         16    >   ISSET_ISEMPTY_CV                                     ~10     !4
         17        BOOL                                                 ~6      ~10
         18    > > JMPZ                                                         ~6, ->21
    5    19    >   ASSIGN                                                       !5, <true>
    4    20      > JMP                                                          ->22
    8    21    >   ASSIGN                                                       !5, <false>
   10    22    > > RETURN                                                       !5
   11    23*     > RETURN                                                       null

End of function emptyinputsignup

Function invaliduid:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gV0gn
function name:  invalidUid
number of ops:  9
compiled vars:  !0 = $username, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   RECV                                                 !0      
   14     1        FRAMELESS_ICALL_2                preg_match          ~2      '%2F%5E%5Ba-zA-Z0-9%5D%2A%24%2F', !0
          2        BOOL_NOT                                             ~3      ~2
          3      > JMPZ                                                         ~3, ->6
   15     4    >   ASSIGN                                                       !1, <true>
   14     5      > JMP                                                          ->7
   18     6    >   ASSIGN                                                       !1, <false>
   20     7    > > RETURN                                                       !1
   21     8*     > RETURN                                                       null

End of function invaliduid

Function invaliduid_:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/gV0gn
function name:  invalidUid_
number of ops:  7
compiled vars:  !0 = $username, !1 = $result
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   31     0  E >   RECV                                                 !0      
   32     1        ASSIGN                                                       !1, <true>
   33     2        FRAMELESS_ICALL_2                preg_match          ~3      '%2F%5E%5Ba-zA-Z0-9%5D%2B%24%2F', !0
          3      > JMPZ                                                         ~3, ->5
   34     4    >   ASSIGN                                                       !1, <false>
   36     5    > > RETURN                                                       !1
   37     6*     > RETURN                                                       null

End of function invaliduid_

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.4 ms | 1488 KiB | 19 Q