Weird PHP behavior: won't assign the integer 8 to a variable

后端 未结 5 477
灰色年华
灰色年华 2021-01-28 13:18

I think I just encountered the strangest \'bug\' I\'ve ever encountered in my short developer life. It seems like I just can\'t assign the value eight to any variable. For exemp

5条回答
  •  情书的邮戳
    2021-01-28 14:15

    If your looking to lead a number with zero (Like a month calendar) you could try something like this:

    $day

    "; ?>

    Looks like everyone else also stated that a number leading with zero is treated as Octal

提交回复
热议问题