Comments (3)
That's because it's not an integer, but a float: https://3v4l.org/Ynacn
When you type a number literal so large it can't fit in an integer, you get a float literal instead of an int literal.
from php-src.
I understand the reason, but this is bad solution with unexpected results. If we will try to write some kind of specific encoder (messagepack for example) we will get broken result.
from php-src.
The automatic change from integer to float happens in many cases, e.g. also when doing some arithmetic e.g. PHP_INT_MAX+1.
If you want to change such a fundamental behaviour you'll have to contact the mailing list and do an RFC.
from php-src.
Related Issues (20)
- Can't cross-compile with external libcrypt HOT 1
- ffi enum type (when enum has no name) make memory leak HOT 2
- Can the final PHP code be compiled into binary and run on the server, which is more secure on the server side and less likely to cause code intrusion? Currently, the traditional deployment method is through source code, which is easily exposed and tampered with. We deploy more security. Java like jar packages are not even more secure. HOT 1
- Member access within null pointer in extension spl
- PHP 8 Compile with GD Help needed HOT 1
- Indexing an array with a persistent string triggers an assertion failure during destruction HOT 4
- Seeing seg fault while using zend_disable_functions during shutdown HOT 10
- Preg unicode different results depending on if in character class or separate HOT 1
- Test curl_basic_024 fails with curl 8.8.0 HOT 3
- PHP 8.1.28 curl_exec crash with no error on first request after second request is made (fast F5) HOT 6
- Magic URL param to disable output buffering HOT 7
- Deprecation messages are often not helpful
- `number_format` no longer round properly big float HOT 9
- segmentation fault in spl_perform_autoload HOT 5
- Memory leak in xml and dom HOT 1
- Zero decimals must not affect casting to int precision HOT 1
- mb_convert_encoding UTF16 to UTF8 HOT 2
- Infinite Loop in zend_cfg.c:100:6
- Build failure (incompatible pointer types, gcc-14) with PDO/iODBC
- Test failure in ext/session/tests/gh13856.phpt HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-src.