Does anyone know a class / library / etc. which can simulate unsigned 32-bit integers on a 32-bit platform in PHP? I am porting C lib to PHP and uses a lot of integers that are more than the maximum for a 32 bit signed int.
Try the BC Math Library , which "supports numbers of any size and precision represented as strings."
Good luck
Why can't you write
modulo(a+b,2^32)
PHP a, b - , " ", , , ,...? , , add_unsigned, .
Do you really need this? php converts to float if you go beyond int.
http://www.php.net/manual/en/language.types.integer.php
var_dump(PHP_INT_MAX); $int = PHP_INT_MAX; var_dump($int + $int);
Source: https://habr.com/ru/post/1738585/More articles:How to create a new widget for dojox.grid.cells.dijit? - dojoGit merging the same file with a changed appearance - gitIncrease parallel shells in PowerShell V2 - powershellProblem using 'useLegacyV2RuntimeActivationPolicy & supportedRuntime in application - .netBest way to remote web application to authenticate users in my current web application? - securityVirtually array offset - arraysSharepoint 2010 Managed Metadata - Unable to Get Term with TermSet - metadataIs it possible to limit db for this rule? - sql-serverEclipse javascript prototype class diagram - javascriptExcel 2007 VSTO plugin exception when setting up Font.Color - c #All Articles