3 ms·
Why this, can someone please explain. Numeric literals can contain underscores between digits. <?php 6.674_083e-11; // float 299_792_458; // decimal 0xCAFE_
by GrumpyNl 7y ago
Why this, can someone please explain.
Numeric literals can contain underscores between digits.
<?php
6.674_083e-11; // float
299_792_458; // decimal
0xCAFE_F00D; // hexadecimal
0b0101_1111; // binary
?>
- deleted 7y ago[deleted]
- RadioactiveMan 7y agoHere's the RFC for it with the "why" and discussion of the tradeoffs. https://wiki.php.net/rfc/numeric_literal_separator https://wiki.php.net/rfc/numeric_literal_separator