Re: Undefined Variables
| From: | Ashley Sheridan | Date: | Thu, 14 Feb 2013 18:09:56 +0000 |
| Subject: | Re: Undefined Variables | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-320206@lists.php.net to get a copy of this message | ||
Roman Gelfand <rgelfand2@gmail.com> wrote:
>Is there a performance hit when a variable is undefined? or, perhaps,
>aside from the obvious uncontrolled conditions, are there other
>impacts?
>
>Thanks in advance
Aside from all the warnings and potential logic bombs?
You will have a negligible performance hit with all the isset() checks you'll be using, but
they won't be noticeable, and its preferred to use them than not to avoid issues with missing
values.
Thanks,
Ash
http://www.ashleysheridan.co.uk