|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
The humble tilde (~). I came across it the other day in some PHP code
Code:
~E_ERROR propostional logic, is it the same thing in PHP ? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
> The humble tilde (~). I came across it the other day in some PHP code
> Code:
~E_ERROR > I'm curious, can't find any documentation on it. In math it refers to > propostional logic, is it the same thing in PHP ? ~ $a Not Bits that are set in $a are not set, and vice versa. http://hu.php.net/manual/en/language...rs.bitwise.php greets, Zoltán Németh > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
2008/4/8 Németh Zoltán <znemeth@alterationx.hu>:
> > The humble tilde (~). I came across it the other day in some PHP code > > Code:
~E_ERROR > > I'm curious, can't find any documentation on it. In math it refers to > > propostional logic, is it the same thing in PHP ? > > ~ $a Not Bits that are set in $a are not set, and vice versa. > > http://hu.php.net/manual/en/language...rs.bitwise.php > > greets, > Zoltán Németh You are right, of course, but it is a good question of how one who is totally unfamiliar with bitwise syntax in any language might ever find that. For people learning the language, it's not like they can type a tilde character into the documenation search and get results. Same for the other operators. I suppose if one thinks to search for the word 'operators', one would get there eventually. I remember how thrown I was years ago when I first tried ^ in PHP, having first learned good ol' MS-DOS BASICA years ago, and thinking that I was raising x to the power of y. :-) Andrew PS - For kicks, I just searched for the word 'tilde' and it returned the delete() function. :-O |
|
![]() |
| Outils de la discussion | |
|
|