From:             al at forest dot akadem dot ru
Operating system: All
PHP version:      4.3.3
PHP Bug Type:     Documentation problem
Bug description:  Incorrect example of class variables initializers

Description:
------------
In chapter 13 "Classes and objects" there is an example of non-valid and
valid initializers:
<?php
/* None of these will work in PHP 4. */
class Cart
{
    var $todays_date = date("Y-m-d");
    var $name = $firstname;
    var $owner = 'Fred ' . 'Jones';
    var $items = array("VCR", "TV");
}
...

Actually, the initializer of $items varaible works at least in PHP 4.3.3.
It may also work in previous versions as I haven't found any news in
ChangeLog related to it.


-- 
Edit bug report at http://bugs.php.net/?id=26402&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26402&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26402&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26402&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26402&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26402&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26402&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26402&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26402&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26402&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26402&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26402&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26402&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26402&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26402&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26402&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26402&r=float

Reply via email to