Skip to content

Fix non-runnable code examples (undefined variables, syntax errors)#5588

Open
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:fix/non-runnable-examples
Open

Fix non-runnable code examples (undefined variables, syntax errors)#5588
lacatoire wants to merge 1 commit into
php:masterfrom
lacatoire:fix/non-runnable-examples

Conversation

@lacatoire
Copy link
Copy Markdown
Member

This fixes a batch of code examples that cannot run as written:

  • undefined variables (a missing $ sigil, or a variable name that does not
    match the one declared just above);
  • a few syntax errors: a missing ;, a stray . that turns a subtraction
    into string concatenation, a = instead of =>, an unterminated string;
  • a Cyrillic homoglyph (С, U+0421) used in a type hint instead of the Latin
    C class;
  • a couple of examples instantiating or calling the wrong class/method name.

Each change only touches the example so it parses and runs as intended.

@lacatoire lacatoire requested a review from TimWolla as a code owner June 1, 2026 09:41
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.

1 participant