Skip to content

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

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

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

Conversation

@AllenJB
Copy link
Copy Markdown
Contributor

@AllenJB AllenJB commented Apr 4, 2026

Related: #4799

object(UnhandledMatchError)#1 (7) {
["message":protected]=>
string(33) "Unhandled match value of type int"
string(33) "Unhandled match case 5"
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
string(33) "Unhandled match case 5"
string(22) "Unhandled match case 5"

int(0)
["file":protected]=>
string(9) "/in/ICgGK"
string(9) "script"
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
string(9) "script"
string(6) "script"

</para>
<para>
It's possible to use a semicolon instead of a colon after a case like:
It's possible to use a semicolon instead of a colon after a case. This syntax is deprecated.
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
It's possible to use a semicolon instead of a colon after a case. This syntax is deprecated.
It's possible to use a semicolon instead of a colon after a case.
As of PHP 8.4.0, this syntax is deprecated.


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);

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