Reply to Re: difference between var and private in a class

Your name:

Reply:


Posted by Michael Fesser on 01/23/07 11:37

..oO(Bosconian)

>I've looked everywhere (including php.net) and can't seem to find the answer
>to this simple question.
>
>What's the difference between var and private when initializing a variable
>in a class?

'var' is deprecated and should be replaced with 'public'. From the
manual:

| Note: The PHP 4 method of declaring a variable with the var keyword is
| still supported for compatibility reasons (as a synonym for the public
| keyword). In PHP 5 before 5.1.3, its usage would generate an E_STRICT
| warning.

Visibility
http://www.php.net/manual/en/language.oop5.visibility.php

Micha

[Back to original 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

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