Edit report at http://bugs.php.net/bug.php?id=54660&edit=1
ID: 54660 Updated by: der...@php.net Reported by: giorgio dot liscio at email dot it Summary: DateInterval Fatal error: main(): Unknown property (h) -Status: Open +Status: Feedback Type: Bug Package: Date/time related Operating System: any? PHP Version: 5.3.6 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php5.3-latest.tar.gz For Windows: http://windows.php.net/snapshots/ This works fine for me: derick@whisky:~$ php -v PHP 5.3.7-dev (cli) (built: May 4 2011 09:16:17) (DEBUG) <?php $a = \DateInterval::createFromDateString("1 month 1 hour"); echo $a->h; // ok $a = \DateInterval::createFromDateString("1 month 0 hour"); echo $a->h; // ok $a = \DateInterval::createFromDateString("1 month -1 hour"); echo $a->h; // fatal error, ->h is not defined ?> 10-1 Previous Comments: ------------------------------------------------------------------------ [2011-05-04 16:54:49] giorgio dot liscio at email dot it Description: ------------ hi, $a = \DateInterval::createFromDateString("1 month 1 hour"); echo $a->h; // ok $a = \DateInterval::createFromDateString("1 month 0 hour"); echo $a->h; // ok $a = \DateInterval::createFromDateString("1 month -1 hour"); echo $a->h; // fatal error, ->h is not defined Fatal error: main(): Unknown property (h) in ...index.php on line 30 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=54660&edit=1