Edit report at http://bugs.php.net/bug.php?id=49380&edit=1
ID: 49380 Comment by: tcjohans at riseup dot net Reported by: tcjohans at riseup dot net Summary: HTML macros Status: Wont fix Type: Feature/Change Request Package: *General Issues Operating System: Windows Vista PHP Version: 5.3.0 Block user comment: N Private report: N New Comment: I have submitted several very good suggestions for development of PHP, but each time I just receive these extremely defensive replies back; I am giving up. Previous Comments: ------------------------------------------------------------------------ [2010-12-29 17:44:04] tcjohans at riseup dot net Why do you tell me this? Either you are interested in implementing and you implement or you don't. Why would I need an obscure reference to some obscure discussion in some obscure place? ------------------------------------------------------------------------ [2010-12-29 13:08:22] j...@php.net Please refer to internals list for several discussions on macros. ------------------------------------------------------------------------ [2009-08-27 02:08:12] tcjohans at riseup dot net 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! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=49380&edit=1