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

Bits that are set in '$user->premission' are not set, and vice versa.
Refer this link http://www.php.net/manual/en/language.operators.bitwise.php

Jump to Post

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.