You are here: Re: Thanks, I understand now « PHP « IT news, forums, messages
Re: Thanks, I understand now

Posted by Jon M. on 05/05/05 13:05

OK, thanks everyone.



My question has been thoroughly answered, and I completely understand now.



I did try the "var $varName;" outside a class, just to see what happened,
and found out it does indeed throw a parse error, so I'll just use a comment
as suggested. I wonder why "Beginning PHP 5 and MySQL from Novice to
Professional by W. Jason Gilmore" says to declare them? I guess he just
meant by assigning a value like: $varName = "Null" or something. I just have
to get used to this new way of "declaring" -lol.



-Jon



"Rasmus Lerdorf" <rasmus@lerdorf.com> wrote in message
news:4279B831.70301@lerdorf.com...
> Jon M. wrote:
>> So, are you saying that it is absolutely "PHP-illegal" to do:
>
> Yes, it is illegal. Inside a class definition you can define properties
> like this, but for regular variables it is simply not supported. And it
> makes no sense. If you can't stop your hands from typing this stuff, do
> this:
>
> #var $varName;
>
> -Rasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация