This is a discussion on &-operator does not work with big numbers within the PHP General forums, part of the PHP Programming Forums category; hello! i think the &-operator has problems with big numbers! a example: /* this works correct */ if((24&8)==...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hello!
i think the &-operator has problems with big numbers! a example: /* this works correct */ if((24&8)==8) echo "ok<br>"; else echo "not ok<br>"; result: "ok"; /* this works wrong */ if((35769305792512&2097152)==2097152) echo "ok<br>"; else echo "not ok<br>"; result: "ok"; here are the numbers in the dual-system: /* 1000001000100000110000110001000000000000000000 1000000000000000000000 */ Thanks, Caszt |