Enable runnable (WASM) examples for language.functions section#5463
Open
AllenJB wants to merge 1 commit intophp:masterfrom
Open
Enable runnable (WASM) examples for language.functions section#5463AllenJB wants to merge 1 commit intophp:masterfrom
AllenJB wants to merge 1 commit intophp:masterfrom
Conversation
TimWolla
reviewed
Apr 17, 2026
| echo "Example function.\n"; | ||
| return $retval; | ||
| } | ||
| ?> |
Member
There was a problem hiding this comment.
Removing the closing ?> is needless churn. Given how the examples sit within the documentation, I personally also feel that the ?> is a nice “example ends here” indicator.
Girgias
requested changes
Apr 17, 2026
Member
Girgias
left a comment
There was a problem hiding this comment.
I don't think removing the ?> is worthwhile churn, especially as this is adding kinda unnecessary work for translations.
Comment on lines
+1669
to
+1670
| <para> | ||
| <informalexample> |
Member
There was a problem hiding this comment.
You don't need a para tag to wrap an example/informalexample tag
Comment on lines
937
to
953
| <![CDATA[ | ||
| <?php | ||
| class Foo | ||
| { | ||
| static $variable = 'static property'; | ||
| static function Variable() | ||
| { | ||
| echo 'Method Variable called'; | ||
| echo "Method Variable called\n"; | ||
| } | ||
| } | ||
|
|
||
| echo Foo::$variable; // This prints 'static property'. It does need a $variable in this scope. | ||
| echo Foo::$variable ."\n"; // This prints 'static property'. It does need a $variable in this scope. | ||
| $variable = "Variable"; | ||
| Foo::$variable(); // This calls $foo->Variable() reading $variable in this scope. | ||
|
|
||
| ?> | ||
| ]]> | ||
| </programlisting> | ||
| </example> |
Member
There was a problem hiding this comment.
Could this have a screen element and showcase the output?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #4799