Doc #69519 [Com]: Incorrect return type for MongoDate::toDateTime

From: Date: Thu, 23 Apr 2015 19:05:00 +0000
Subject: Doc #69519 [Com]: Incorrect return type for MongoDate::toDateTime
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12245@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=69519&edit=1 ID: 69519 Comment by: austin dot emmons at modolabs dot com Reported by: austin dot emmons at modolabs dot com Summary: Incorrect return type for MongoDate::toDateTime Status: Open Type: Documentation Problem Package: Documentation problem Operating System: N/A PHP Version: Irrelevant Block user comment: N Private report: N New Comment: It actually looks like this doc bug has been fixed when I go to edit the PHP doc. It must just not have been deployed to php.net yet. Previous Comments: ------------------------------------------------------------------------ [2015-04-23 19:02:20] austin dot emmons at modolabs dot com Description: ------------ --- From manual page: http://www.php.net/mongodate.todatetime --- The method says it returns a string, but it returns a DateTime object. Test script: --------------- <?php $d = new MongoDate(strtotime("2014-11-18 11:01:25")); var_dump( $d->toDateTime() ); ?> Expected result: ---------------- I expect to see a DateTime object output. Actual result: -------------- I get a DateTime object output. The docs say it is a string though. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=69519&edit=1

« previous php.doc.bugs (#12245) next »