Edit report at http://bugs.php.net/bug.php?id=52738&edit=1
ID: 52738 Updated by: [email protected] Reported by: camka at hot dot ee Summary: Can't use new properties in class extended from DateInterval -Status: Open +Status: Closed Type: Bug Package: Date/time related Operating System: Ubuntu 10.04 PHP Version: 5.3.3 -Assigned To: +Assigned To: stas Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2010-08-30 12:50:27] camka at hot dot ee Description: ------------ When trying to set or get any pre-defined property other then y/m/d/h/i/s in a class extended from built-in DateInterval, the error tells you that the property is not known. Also tried with PHP 5.3.4-dev (cli) (built: Aug 30 2010 13:48:30) Test script: --------------- <?php class di extends DateInterval { public $unit = 1; } $I = new di('P10D'); echo $I->unit; Expected result: ---------------- 1 Actual result: -------------- Fatal error: main(): Unknown property (unit) in /var/www/test/inter.php on line 7 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=52738&edit=1
