-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Implemented %% integer division operator #724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Huge -1 on this, |
It's one of the few sane syntax choices IMO, I'd prefer that over |
Although it has no potential for name clashes, I agree that with |
Sure, but I can't think of a better choice. :/ |
I don't like %% too much either. Also, what about gmp? I don't see this patch updating gmp to support the new operator. |
Also, tokenizer tests are unhappy. |
On 16 Jul 2014, at 18:36, Stanislav Malyshev [email protected] wrote:
Somehow I managed to think of doing it for my bigints patch but not for the gmp extension, I’ll do that, my bad. Andrea Faulds |
@smalyshev I'm unable to reproduce the tokeniser issue on my machine. |
@TazeTSchnitzel still not the reason to break CI :) |
Sure... I'll try and figure out what's up. |
@smalyshev Fixed it. It "didn't happen on my machine" because I compiled with |
@datibbaw I'd argue it does make some sort of sense, it's just rather backwards: |
If only we didn't use \ for namespaces, we could use it here like some other languages do... |
Yeah, Visual Basic does that and it's a good choice. |
No, \ is already used in namespaces, we can not use it without creating an ambiguity. |
Right, but would the double-backslash work? Can you have a blank namespace? |
You can not use \ for namespace, but I don't think it is a good idea to reuse namespace syntax for completely unrelated operator. |
Yeah, that's the problem. |
I don't like this %%. ........... -1 |
RFC was rejected, so this request is closed. |
https://wiki.php.net/rfc/intdiv
There's also a pull request that just adds a function to
ext/standard
instead, in case I can't get the operator in: #722