Re: [PHP] Bitwise NOT operator?

2010-08-25 Thread Richard Quadling
] Bitwise NOT operator? From your example, this would have shown me what I needed to know: Then taking the value of E_NOTICE... 1000 ... and inverting it via ~: 0111 As it was, I assumed the 32-bit number was there because the author wanted it there, not because

Re: [PHP] Bitwise NOT operator?

2010-08-25 Thread Peter Lind
Please stop arguing this pointless topic on the php mailing list. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/)

RE: [PHP] Bitwise NOT operator?

2010-08-25 Thread Bob McConnell
From: Richard Quadling On 24 August 2010 21:42, Andy McKenzie amckenz...@gmail.com wrote: On Tue, Aug 24, 2010 at 3:55 PM, Ford, Mike m.f...@leedsmet.ac.uk wrote: From: Andy McKenzie [mailto:amckenz...@gmail.com] From your example, this would have shown me what I needed to know: Then taking

Re: [PHP] Bitwise NOT operator?

2010-08-24 Thread Richard Quadling
On 20 August 2010 17:00, Andy McKenzie amckenz...@gmail.com wrote:  Thanks to everyone who responded.  I've dealt with binary math before, but it never occurred to me (and doesn't seem to be anywhere in the document page at php.net!) that it would automatically pad the number I entered. There

Re: [PHP] Bitwise NOT operator?

2010-08-24 Thread Andy McKenzie
On Tue, Aug 24, 2010 at 11:06 AM, Richard Quadling rquadl...@gmail.com wrote: On 20 August 2010 17:00, Andy McKenzie amckenz...@gmail.com wrote:  Thanks to everyone who responded.  I've dealt with binary math before, but it never occurred to me (and doesn't seem to be anywhere in the document

Re: [PHP] Bitwise NOT operator?

2010-08-24 Thread Ashley Sheridan
On Tue, 2010-08-24 at 12:24 -0400, Andy McKenzie wrote: On Tue, Aug 24, 2010 at 11:06 AM, Richard Quadling rquadl...@gmail.com wrote: On 20 August 2010 17:00, Andy McKenzie amckenz...@gmail.com wrote: Thanks to everyone who responded. I've dealt with binary math before, but it never

RE: [PHP] Bitwise NOT operator?

2010-08-24 Thread Ford, Mike
-Original Message- From: Andy McKenzie [mailto:amckenz...@gmail.com] Sent: 24 August 2010 17:24 To: php-general@lists.php.net Subject: Re: [PHP] Bitwise NOT operator? From your example, this would have shown me what I needed to know: Then taking the value of E_NOTICE... 1000

Re: [PHP] Bitwise NOT operator?

2010-08-24 Thread Andy McKenzie
On Tue, Aug 24, 2010 at 3:55 PM, Ford, Mike m.f...@leedsmet.ac.uk wrote: -Original Message- From: Andy McKenzie [mailto:amckenz...@gmail.com] Sent: 24 August 2010 17:24 To: php-general@lists.php.net Subject: Re: [PHP] Bitwise NOT operator? From your example, this would have shown

[PHP] Bitwise NOT operator?

2010-08-20 Thread Andy McKenzie
Hey everyone, I'm really not sure what's going on here: basically, the bitwise NOT operator seems to simply not work. Here's an example of what I see. Script $ cat bintest2.php ?php $bin = 2; $notbin = ~$bin; echo Bin: . decbin($bin) . !bin: . decbin($notbin)

Re: [PHP] Bitwise NOT operator?

2010-08-20 Thread Peter Lind
On 20 August 2010 17:10, Andy McKenzie amckenz...@gmail.com wrote: Hey everyone,  I'm really not sure what's going on here:  basically, the bitwise NOT operator seems to simply not work.  Here's an example of what I see. Script $ cat bintest2.php ?php $bin = 2;

Re: [PHP] Bitwise NOT operator?

2010-08-20 Thread Peter Lind
On 20 August 2010 17:41, Peter Lind peter.e.l...@gmail.com wrote: On 20 August 2010 17:10, Andy McKenzie amckenz...@gmail.com wrote: Hey everyone,  I'm really not sure what's going on here:  basically, the bitwise NOT operator seems to simply not work.  Here's an example of what I see.

Re: [PHP] Bitwise NOT operator?

2010-08-20 Thread Andy McKenzie
Thanks to everyone who responded. I've dealt with binary math before, but it never occurred to me (and doesn't seem to be anywhere in the document page at php.net!) that it would automatically pad the number I entered. The example I gave was essentially a test I was running: in the real