3v4l.org

run code in 300+ PHP versions simultaneously
<?php $usernameCheck = 'dani'; function checkUsername($username) { return (bool)!preg_match('/[^a-z_\-0-9]/i', $username); } if (false === checkUsername($usernameCheck)) { echo 'ok'; } else { echo 'false';}
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 = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iqSol
function name:  (null)
number of ops:  10
compiled vars:  !0 = $usernameCheck
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'dani'
    9     1        INIT_FCALL                                               'checkusername'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        TYPE_CHECK                                    4          $2
          5      > JMPZ                                                     ~3, ->8
          6    >   ECHO                                                     'ok'
          7      > JMP                                                      ->9
          8    >   ECHO                                                     'false'
          9    > > RETURN                                                   1

Function checkusername:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iqSol
function name:  checkUsername
number of ops:  9
compiled vars:  !0 = $username
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    6     1        INIT_FCALL                                               'preg_match'
          2        SEND_VAL                                                 '%2F%5B%5Ea-z_%5C-0-9%5D%2Fi'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $1      
          5        BOOL_NOT                                         ~2      $1
          6        BOOL                                             ~3      ~2
          7      > RETURN                                                   ~3
    7     8*     > RETURN                                                   null

End of function checkusername

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.23 ms | 1398 KiB | 16 Q