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 is no padding.

php -r "echo decbin(~2), PHP_EOL, decbin(-3);"

That's 100% correct and proper. Not "padded".

The example in [1] regarding E_ALL & ~E_NOTICE is a perfect example.


[1] http://docs.php.net/manual/en/language.operators.bitwise.php
Richard Quadling.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to