OOP Question

    Date: 01/04/05 (PHP Development)    Keywords: php

    Ok, so it appears that in PHP5, when declaring variables within a class, "var" is being depricated, and "public, private, protected" are the preferred descriptors for a variable type. I see that using "var $varname" is still allowed, and PHP5 just makes it a public variable by default. Is there a way to keep a variable private or protected within a class in PHP4? And have it work in PHP5?

    BTW, has anyone else made the switch from v4 to v5 and encountered any gotchas along the way?

    [X-posted to PHP]

    Source: http://www.livejournal.com/community/php_dev/51280.html

« First post(phpmyadmin not... || how to make an ecard? »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home