Literals/Integer: Difference between revisions

Content added Content deleted
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
Line 1,572: Line 1,572:


<lang php><?php
<lang php><?php
if ( 727 == 0x2d7 &&
if (727 == 0x2d7 &&
727 == 01327 )
727 == 01327) {
echo "true\n";
echo "true\n";
}
?></lang>

$a = 1234; // decimal number
$a = 0123; // octal number (equivalent to 83 decimal)
$a = 0x1A; // hexadecimal number (equivalent to 26 decimal)
$a = 0b11111111; // binary number (equivalent to 255 decimal)
$a = 1_234_567; // decimal number (as of PHP 7.4.0)
</lang>


=={{header|PicoLisp}}==
=={{header|PicoLisp}}==