Class variable declarations: public/private/protected



<?php
class myClass
{
var $myVar;
..
..
}
?>

In php.ini I have  error_reporting = E_ALL | E_STRICT
The above code is causing the following error/notification in my Apache
logs:-

"PHP Strict Standards: var: Deprecated. Please use the
public/private/protected modifiers."

Searching in the most current .chm help finds very little, indeed the
class definition examples still use var.

I understand the reason for the warning, what I don't have is a scope
definition for public, private and protected nor an explicit definition
of how to use the modifiers.

Any help on the above would be appreciated.

Steve.

--
PHP 5.0.4  Apache 2.0.54  Win2K/SP4
If you must reply by email, remove the DOT's first...
.



Relevant Pages

  • Re: Class variable declarations: public/private/protected
    ... class myClass {var $myVar;. ... The above code is causing the following error/notification in my Apache ... class definition examples still use var. ... private and protected were keywords in the ...
    (comp.lang.php)
  • Re: Class variable declarations: public/private/protected
    ... > Searching in the most current .chm help finds very little, ... > class definition examples still use var. ...
    (comp.lang.php)
  • Re: include file in class
    ... var $var; ... static/instantiated method calls or through inheritance: ...
    (comp.lang.php)
  • include file in class
    ... class myClass{function{include 'func.php'; func; //returns $var //do something with $var return $array;} ... include 'func.php'; func;//returns $var //do something with $var return $array2;}} ... class myClass{include 'func.php'; //but this don't work ...
    (comp.lang.php)
  • $_SERVER[php_auth_user] on other servers
    ... Now I got a free account at Lycos and apparently they do not have ... Apache or do not have it running as a module since this var is empty. ...
    (comp.lang.php)