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); } var_dump(checkUsername($usernameCheck));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lr0Rb
function name:  (null)
number of ops:  8
compiled vars:  !0 = $usernameCheck
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'dani'
    9     1        INIT_FCALL                                               'var_dump'
          2        INIT_FCALL                                               'checkusername'
          3        SEND_VAR                                                 !0
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function checkusername:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lr0Rb
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:
174.7 ms | 1397 KiB | 18 Q