Doc #69519 [Opn->Csd]: Incorrect return type for MongoDate::toDateTime

From: Date: Thu, 23 Apr 2015 19:29:40 +0000
Subject: Doc #69519 [Opn->Csd]: Incorrect return type for MongoDate::toDateTime
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12246@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 User updated 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 +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: N/A PHP Version: Irrelevant Block user comment: N Private report: N New Comment: See above comment, looks to be fixed when I try to edit the docs, I guess this will go out in next update to php.net Previous Comments: ------------------------------------------------------------------------ [2015-04-23 19:04:59] austin dot emmons at modolabs dot com 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. ------------------------------------------------------------------------ [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 (#12246) next »