Re: New construct discussion Summary
| From: | Marc Richards | Date: | Sun, 11 Jul 2004 18:44:37 +0000 |
| Subject: | Re: New construct discussion Summary | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-11095@lists.php.net to get a copy of this message | ||
Sean Coates wrote:
Not meaning to add more confusion, but Coldfusion (yes yes, please keep laughter to a minimum) has had a similar function since the beginning (IIRC). it's <cfparam ... > http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-b13.htm Perhaps a php function "param(...)" ? Even though it's not always a request parameter we'll (developers) be checking, this will be true in most cases.I don't think a function named param() really fits, but I do like the idea of adding a type check (or in the case of PHP a type cast) to the function. $level = (int) (isset($_SESSION['level']) ? $_SESSION['level'] : (isset($_REQUEST['level']) ? $_REQUEST['level'] : 1)) becomes $level = value($_SESSION['level'], $_REQUEST['level'], 1, INT); Of course, I have no idea how feasible this is. Marc