Doc #68444 [Opn->Csd]: Change in method signature since 5.5

From: Date: Tue, 18 Nov 2014 14:40:32 +0000
Subject: Doc #68444 [Opn->Csd]: Change in method signature since 5.5
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11658@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68444&edit=1 ID: 68444 Updated by: salathe@php.net Reported by: robert at idacmedia dot com Summary: Change in method signature since 5.5 -Status: Open +Status: Closed Type: Documentation Problem Package: Documentation problem Operating System: n/a PHP Version: 5.5.19 -Assigned To: +Assigned To: salathe Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Fixed the prototypes and added a changelog section. Previous Comments: ------------------------------------------------------------------------ [2014-11-18 14:39:49] salathe@php.net Automatic comment from SVN on behalf of salathe Revision: http://svn.php.net/viewvc/?view=revision&revision=335194 Log: DatePeriod hints DateTimeInterface (doc bug #68444) ------------------------------------------------------------------------ [2014-11-18 12:19:13] robert at idacmedia dot com Description: ------------ --- From manual page: http://www.php.net/dateperiod.construct --- As the supplied code snippet works without errors I'd suggest the method signature for the DatePeriod constructor is actually (since v5.5): public DatePeriod::__construct ( DateTimeInterface $start , DateInterval $interval , int $recurrences [, int $options ] ) public DatePeriod::__construct ( DateTimeInterface $start , DateInterval $interval , DateTimeInterface $end [, int $options ] ) public DatePeriod::__construct ( string $isostr [, int $options ] ) Test script: --------------- new DatePeriod(new DateTimeImmutable('2015-01-01'), new DateInterval('P1D'), 0); new DatePeriod(new DateTimeImmutable('2015-01-01'), new DateInterval('P1D'), new DateTimeImmutable('2015-01-02')); Expected result: ---------------- An error would be expected if the manual was correct. Actual result: -------------- No error - DatePeriod object is created. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68444&edit=1

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