Skip to content

Enable runnable (WASM) examples for language.control-structures section#5462

Open
AllenJB wants to merge 3 commits intophp:masterfrom
AllenJB:runnable_lang_ctrlstructs
Open

Enable runnable (WASM) examples for language.control-structures section#5462
AllenJB wants to merge 3 commits intophp:masterfrom
AllenJB:runnable_lang_ctrlstructs

Conversation

@AllenJB
Copy link
Copy Markdown
Contributor

@AllenJB AllenJB commented Apr 4, 2026

Related: #4799

Comment thread language/control-structures/match.xml Outdated
Comment thread language/control-structures/match.xml Outdated
Comment thread language/control-structures/switch.xml Outdated

for($i = 0; $i < count($people); ++$i) {
$people[$i]['salt'] = mt_rand(000000, 999999);
$people[$i]['salt'] = random_int(100000, 999999);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
$people[$i]['salt'] = random_int(100000, 999999);
$people[$i]['salt'] = random_int(0, 999999);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The 100k minimum was chosen intentionally for both examples here because it results in the output not varying in length, which I think reduces noise in the example.

Co-authored-by: Louis-Arnaud <la.catoire@gmail.com>
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