Thursday, April 21, 2011

Is it old explanation,if he use var thing for his PHP OOP explanation?

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

for example,

<?php
    class person {
     var name;
    }
?>
From stackoverflow
  • 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.

    aaa : thnaks.I got. .

0 comments:

Post a Comment