- This topic has 4 replies, 1 voice, and was last updated 3 weeks, 2 days ago by skyrim1.
- October 30, 2020 at 11:17 am #1121GirgiasParticipant
PHP RFC: Explicit octal integer literal notationOctober 30, 2020 at 11:17 am #1122addvilzGuest
Absolutely makes sense. Away with these annoying inconsistencies.October 30, 2020 at 11:17 am #1123DriliridGuest
Trash. It’s like that because of chmod.October 30, 2020 at 11:17 am #1124davidsevGuest
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.October 30, 2020 at 11:17 am #1125skyrim1Guest
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
- You must be logged in to reply to this topic.