Skip to content

Enable runnable (WASM) examples for language.variables section#5455

Merged
jordikroon merged 3 commits into
php:masterfrom
AllenJB:runnable_lang_vars
May 7, 2026
Merged

Enable runnable (WASM) examples for language.variables section#5455
jordikroon merged 3 commits into
php:masterfrom
AllenJB:runnable_lang_vars

Conversation

@AllenJB
Copy link
Copy Markdown
Contributor

@AllenJB AllenJB commented Apr 2, 2026

Related: #4799

Line endings, var_dump() or function calls have been added as appropriate to actually run the code and provide useful output.

Some example output code was rearranged so the WASM output replaces it as expected.

Additional changes:

  • Removing ?> where not required
  • Added a note to the invalid reference assignment examples to describe actual behavior

I'm wondering if there are some alternative examples of invalid assignment that aren't just outright (and "unrelated") syntax errors.

Comment thread language/variables.xml Outdated
@AllenJB AllenJB requested a review from jordikroon April 4, 2026 08:07
Comment thread language/variables.xml
<example>
<title>Valid variable names</title>
<programlisting role="php">
<programlisting role="php" annotations="non-interactive">
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.

Is there a specific reason why this is marked as non-interactive? To me a valid example seems more useful than examples that generate a syntax error.

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 example is demonstrating valid variable names. At least half the example gives no useful output and I thought adding extra output here might dilute the purpose of the example.

Comment thread language/variables.xml Outdated
@AllenJB AllenJB requested a review from jordikroon May 7, 2026 16:02
@jordikroon jordikroon merged commit 64007e9 into php:master May 7, 2026
2 checks passed
lacatoire added a commit to lacatoire/doc-fr that referenced this pull request May 8, 2026
PR upstream: php/doc-en#5455
Commit: 64007e9f6b23f70d8874be11c4eb9d45556b742f
Closes php#2815
lacatoire added a commit to php/doc-fr that referenced this pull request May 8, 2026
PR upstream: php/doc-en#5455
Commit: 64007e9f6b23f70d8874be11c4eb9d45556b742f
Closes #2815
PhilDaiguille pushed a commit to php/doc-es that referenced this pull request May 9, 2026
PR upstream: php/doc-en#5455
Commit: 64007e9f6b23f70d8874be11c4eb9d45556b742f
Closes #576
jordikroon pushed a commit to Narkunan/doc-en that referenced this pull request May 17, 2026
* Enable runnable (WASM) examples for language.variables section
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