Bug #11844 Updated: It would be nice to have tags in PHP just like JSP tags.

From: Date: Tue, 02 Oct 2001 15:27:57 +0000
Subject: Bug #11844 Updated: It would be nice to have tags in PHP just like JSP tags.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-67060@lists.php.net to get a copy of this message
ID: 11844 Updated by: rasmus Reported By: aaronshaf@yahoo.com Status: Closed Bug Type: Feature/Change Request Operating System: Win 2000 PHP Version: 4.0.6 New Comment: It is syntactical candy that would slow down the parser by a huge amount. You can do exactly the same thing with less typing like this: <?$webskin->menu('Clothing')?> <?$webskin->menuItem('Shirts','shirts.php')?> <?$webskin->menuItem('Pants','pants.php')?> <?$webskin->menuItem('Socks','socks.php')?> <?$webskin->endmenu()?> Previous Comments: ------------------------------------------------------------------------ [2001-10-02 11:03:19] aaronshaf@yahoo.com The purpose of the tag libraries is to appropriately call the functions. One of the advantages is nested tags. Code would look a lot cleaner as well. ------------------------------------------------------------------------ [2001-10-02 10:58:49] rasmus@php.net So make yourself a function and call it. This isn't going to happen in PHP. ------------------------------------------------------------------------ [2001-10-02 10:51:08] aaronshaf@yahoo.com There is a good tutorial on JSP tags are at http://java.sun.com/products/jsp/tutorial/TagLibrariesTOC.html. To give you an idea, let's say I wanted PHP to automatically generate code (defined through tag library) for a menu: <webskin:menu title="Clothing"> <webskin:menuItem title="Shirts" url="shirts.php"/> <webskin:menuItem title="Pants" url="pants.php"/> <webskin:menuItem title="Socks" url="socks.php"/> </webskin:menu> ------------------------------------------------------------------------ [2001-10-02 04:19:54] sander@php.net No feedback -> closing ------------------------------------------------------------------------ [2001-07-02 14:55:55] derick@php.net What are JSP tags? ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/?id=11844 Edit this bug report at http://bugs.php.net/?id=11844&edit=1

« previous php.dev (#67060) next »