range: Update for PHP 8.3#2801
Merged
Merged
Conversation
TimWolla
reviewed
Oct 5, 2023
Member
TimWolla
left a comment
There was a problem hiding this comment.
Some remarks. Will probably require a second pass depending on the changes you do.
TimWolla
reviewed
Oct 6, 2023
Member
TimWolla
left a comment
There was a problem hiding this comment.
LGTM once the three remaining remarks are resolved.
TimWolla
reviewed
Oct 7, 2023
Member
TimWolla
left a comment
There was a problem hiding this comment.
I'Ve now had a look at the rendered version. In addition to the new review marks, consider changing the example to:
<?php
echo implode(', ', range(0, 12)), PHP_EOL;
echo implode(', ', range(0, 100, 10)), PHP_EOL;
echo implode(', ', range('a', 'i')), PHP_EOL;
echo implode(', ', range('c', 'a')), PHP_EOL;
echo implode(', ', range('A', 'z')), PHP_EOL;
?>
with the output:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
a, b, c, d, e, f, g, h, i
c, b, a
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, [, \, ], ^, _, `, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
The current example lacks the output entirely is is unncessarily verbose with the loops. The new example also showcases non-letter bytes.
TODO Better examples
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
TimWolla
reviewed
Oct 16, 2023
Member
|
I've now merged this, it's not getting better when it sits around for longer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TODO Better examplesI can't come up with them, and they can always be added later.