PHP RFC: Explicit octal integer literal notation

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1121
    Girgias
    Participant

    PHP RFC: Explicit octal integer literal notation

    #1122
    addvilz
    Guest

    Absolutely makes sense. Away with these annoying inconsistencies.

    #1123
    Drilirid
    Guest

    Trash. It’s like that because of chmod.

    #1124
    davidsev
    Guest

    I don’t like this.

    Consistency and standards are important, and using 0 as the octal prefix is consistent and as close to a standard as it gets. Yes, it’s stupid, but if you want to change it you’re about 50 years too late.

    PHP deciding to be different to everyone else is just going to be another stumbling block to deter people from learning the language.

    In addition, the only rationale given is that using 0 is bad and creates confusion. Aside from the fact that the same would be true the other way, that’s only actually an argument for removing the 0 prefix. That would be a massive BC break and will never happen, so this will just be another oddity of duplicated functionality to confuse people with, and thus is counterproductive.

    #1125
    skyrim1
    Guest

    This may lead to strings acting in weird way

    Strings starting with `0O` being converted to octal numbers is weird

    Especially when you use `===` you expect the exact thing, not a converted string to octal integer

    What use case does this have ?

    Maybe its better for this functionality to be external library

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.