Skip to content
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

range: Update for PHP 8.3 #2801

Merged
merged 7 commits into from
Oct 16, 2023
Merged

range: Update for PHP 8.3 #2801

merged 7 commits into from
Oct 16, 2023

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Sep 27, 2023

TODO Better examples I can't come up with them, and they can always be added later.

@Girgias Girgias marked this pull request as ready for review October 5, 2023 00:03
@Girgias Girgias added this to the PHP 8.3 milestone Oct 5, 2023
@Girgias Girgias requested a review from TimWolla October 5, 2023 12:14
Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some remarks. Will probably require a second pass depending on the changes you do.

reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once the three remaining remarks are resolved.

reference/array/functions/range.xml Outdated Show resolved Hide resolved
Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
Girgias and others added 6 commits October 10, 2023 00:52
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
reference/array/functions/range.xml Outdated Show resolved Hide resolved
reference/array/functions/range.xml Outdated Show resolved Hide resolved
@TimWolla TimWolla changed the title Update range() documentation for PHP 8.3 changes range: Update for PHP 8.3 Oct 16, 2023
@TimWolla TimWolla merged commit 62421b9 into php:master Oct 16, 2023
2 checks passed
@TimWolla
Copy link
Member

I've now merged this, it's not getting better when it sits around for longer.

@Girgias Girgias deleted the range-rfc-doc branch October 16, 2023 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants