$username = "JohnDoe123"; if(isCreatableName($username)){ echo "Username is valid"; } else { echo "Username is not valid"; }
if(isCreatableName($_POST['username'])){ // code to create new user } else { echo "Invalid username"; }In this example, we are using the isCreatableName function to check if the username submitted through a form ($_POST['username']) is valid or not. If it is valid, we can proceed with creating a new user. If it is not valid, we will display an error message saying "Invalid username". Package library: It is not possible to determine the package library from just the function name. More context is needed to determine which package library this function belongs to.