php for the difference between public and subject var

var public and effect almost as if there is no definition of variable var plus the protected or private by default public

PHP4 is generally var
PHP5 it is generally used in the public

now basically used instead of public var
var variables are defined; the public is defined visibility property (properties) and a method (method)

 

var is PHP4 when used, and it is now the Public role as now with the Public, PHP4 when there is no Public, Private, Protected, only one var

 

Write this essay for later know that the problem

Guess you like

Origin www.cnblogs.com/xu1115/p/10971460.html