tags:

views:

162

answers:

1

Is this old way to explain for PHP oop, if he use var thing?

for example,

<?php
    class person {
     var name;
    }
?>
+2  A: 

Yes. The var keyword is PHP 4 syntax, deprecated in PHP 5 and no longer used.

If you run your script with E_STRICT error reporting, it should notify you of this.

Use public, private, or protected instead.

See http://www.php.net/manual/en/language.oop5.visibility.php for more information.

Bill Karwin
thnaks.I got. .
aaa