PHP bitwise inversion problems

Source: Internet
Author: User
The PHP bitwise inversion problem now has a string of numbers, $ str = 1300022332121 requires bitwise inversion. how can we get this bitwise inversion, which is opposite to the bitwise inversion of other programs, is there a difference, because I want to pass it to a program written in C ++. ask everyone to teach, PHPcode $ str = 1300022332121; echo ~ $ St PHP bitwise inversion problem
There is a string of numbers,
$ Str = 1300022332121
How do I obtain the bitwise result?
Is this bitwise inversion different from the bitwise inversion of other programs?
Because I want to pass it to a program written in C ++,
Thank you!

------ Solution --------------------
PHP code
$ Str = 1300022332121; echo ~ $ Str; // 2147483647
------ Solution --------------------
Not that simple

What is your C ++ requirement?

1300022332121 has exceeded the unsigned long value range.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.