What does a leading zero do for a php int?

前端 未结 4 1712
没有蜡笔的小新
没有蜡笔的小新 2020-12-02 02:42
echo(073032097109032116104101032118101114121032109111100101108032111102032097032109111100101114110032109097106111114032103101110101114097108046);

E

4条回答
  •  盖世英雄少女心
    2020-12-02 03:12

    Manual:

    Warning

    If an invalid digit is given in an octal integer (i.e. 8 or 9), the rest of the number is ignored.

    Example #2 Octal weirdness

    
    

    So your number gets cut off after 0730320, which is 241872 in decimal.

提交回复
热议问题