|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-12-29 13:08 UTC] jani@php.net
-Status: Open
+Status: Wont fix
-Package: Feature/Change Request
+Package: *General Issues
[2010-12-29 13:08 UTC] jani@php.net
[2010-12-29 17:44 UTC] tcjohans at riseup dot net
[2010-12-29 17:47 UTC] tcjohans at riseup dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 04 17:00:01 2025 UTC |
Description: ------------ I propose the ability to create "macros" that can be used in the HTML (outside of the PHP start and end tags, <?php and ?>). This will facilitate using PHP in systems oriented to web site builders who lack knowledge of PHP, but need to use certain interactive features. The below example creates a macro USERNAME which can be inserted into HTML to reflect the current site user's name. However, macros could perhaps also be used to create forms, e.g. by defining a macro "FORM". Also, if macros could be defined so as to take arguments, they would be even more powerful. Reproduce code: --------------- <?php global $USERNAME; $USERNAME = "John"; macro USERNAME { global $USERNAME; echo $USERNAME; } ?> Hello!<br> Your name is USERNAME.<br> Bye! Expected result: ---------------- Hello! Your name is John. Bye!