Numerical literal separator for better readability in PHP

1 · Amit Merchant · June 18, 2021, 6:21 a.m.
When you’re working with numbers in your code, they sometimes become hard to comprehend. For instance, in cases where numbers are too large in terms of length. Take the following for example. $number = 5000000000; If you spot the above number somewhere in your code, I’m pretty sure you would not be able to make out what this number represents by just looking at it. You would need to squeeze your eyes a little more in order to process the number in your mind. In the real world, to make this easi...