Home  >  Q&A  >  body text

Why is this answer 13925?

<?php//The maximum value range of octal is 0-7, that is, 0,1,2,3,4,5,6,7$bajingzhi = 033145;echo $bajingzhi;?>

P粉751989631P粉751989631776 days ago915

reply all(1)I'll reply

  • WBOY

    WBOY2022-09-26 09:58:49

    Because 13925 (decimal) = 33145 (octal)

    $bajingzhi = 033145 means declaring an octal number

    Because the characteristic of octal declaration is to add 0 in front of the number, and after is an integer from 0 to 7.

    Just like hexadecimal declarations, they all start with 0x.

    You can try removing the 0 in front, or adding an integer greater than 7 at the end.

    reply
    0
  • Cancelreply