From:             hannes dot magnusson at gmail dot com
Operating system: Linux
PHP version:      5.3.0alpha1
PHP Bug Type:     Date/time related
Bug description:  Unable to var_dump(DateInterval)

Description:
------------
The DateInterval does not seem to expose its properties to var_dump().. 

Reproduce code:
---------------
[EMAIL PROTECTED]:~$ cat test.php 
<?php

$date = new DateTime("28-July-2008");
$other = new DateTime("31-July-2008");

$diff = date_diff($date, $other);

var_dump($diff);
echo $diff, "\n";

[EMAIL PROTECTED]:~$ ~/php/5.3/sapi/cli/php test.php 
object(DateInterval)#3 (0) {
}

Catchable fatal error: Object of class DateInterval could not be converted
to string in /crypto/bjori/test.php on line 9


Expected result:
----------------
The properties to retrieve the actual difference.


-- 
Edit bug report at http://bugs.php.net/?id=45682&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45682&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45682&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45682&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45682&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45682&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45682&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45682&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45682&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45682&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45682&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45682&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45682&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45682&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45682&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45682&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45682&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45682&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45682&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45682&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45682&r=mysqlcfg

Reply via email to