Re: Package proposal: HTTP_Status
| From: | Greg Beaver | Date: | Tue, 26 Aug 2003 16:43:45 +0000 |
| Subject: | Re: Package proposal: HTTP_Status | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20563@lists.php.net to get a copy of this message | ||
Marshall Roch wrote:
eval("\$code = HTTP_HEADER_STATUS_".$code.';');
This eval() is conpletely unnecessary - use the constant() function built into PHP since 4.0.4
$code = constant('HTTP_HEADER_STATUS_' . $code);
http://www.php.net/manual/en/function.constant.php
Regards,
Greg