Skip to content

range: Update for PHP 8.3#2801

Merged
TimWolla merged 7 commits into
php:masterfrom
Girgias:range-rfc-doc
Oct 16, 2023
Merged

range: Update for PHP 8.3#2801
TimWolla merged 7 commits into
php:masterfrom
Girgias:range-rfc-doc

Conversation

@Girgias
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Copy link
Copy Markdown
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.

Comment thread reference/array/functions/range.xml Outdated
Copy link
Copy Markdown
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.

Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
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>
Comment thread reference/array/functions/range.xml Outdated
Comment thread reference/array/functions/range.xml Outdated
@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
@TimWolla
Copy link
Copy Markdown
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