Re: Odd Code Error.
| From: | daniel at electroteque dot org | Date: | Wed, 21 Jan 2004 23:14:30 +0000 |
| Subject: | Re: Odd Code Error. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-175356@lists.php.net to get a copy of this message | ||
> I agree with Chris...
>
> In contrast you can also see a common problem in many of the
> downloadable scripts from different collections on the net, like
> hotscripts.com, where the programmers start building control structures
> whitout having the different variables they use set.
>
> For instance if($name) instead of if(isset($name)), and it is done,
> simply bacuse php does not force you to declare your variables.
>
> I also help out in different danish internet forums, and there are some
> of the newbees that have no clue about type juggeling, which at times
> can cause problems. And start explaing to another person, who is not an
> experienced programmer about types over the net, is not that easy, and
> many times only leads to more confusion.
>
So do you recommend using isset($name) instead of ($name) ? And what are
you meaning by setting the var as in var $name ? i usually set them in
classes but how about in normal scripts and functions ?