hi everyone

l see this code in user script and i don't know why he use this ~ symbol

the code is

if( ~$user->premission & USER::create_Forum){
...................
}

is this symbol for negative or what

i still wait any idea about it

Recommended Answers

All 4 Replies

~ $a- means(Not) Bits that are set in $a are not set, and vice versa.

thanks a lot guys for help me

Solved ? Mark as 'Solved' with the below link like 'Marke as Solved Thread' or somethign similar.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.