Doc #68444 [NEW]: Change in method signature since 5.5

From: Date: Tue, 18 Nov 2014 12:19:14 +0000
Subject: Doc #68444 [NEW]: Change in method signature since 5.5
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11657@lists.php.net to get a copy of this message
From: robert at idacmedia dot com Operating system: n/a PHP version: 5.5.19 Package: Documentation problem Bug Type: Documentation Problem Bug description:Change in method signature since 5.5 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 bug report at https://bugs.php.net/bug.php?id=68444&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=68444&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=68444&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=68444&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=68444&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=68444&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=68444&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=68444&r=needscript Try newer version: https://bugs.php.net/fix.php?id=68444&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=68444&r=support Expected behavior: https://bugs.php.net/fix.php?id=68444&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=68444&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=68444&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=68444&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=68444&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=68444&r=dst IIS Stability: https://bugs.php.net/fix.php?id=68444&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=68444&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=68444&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=68444&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=68444&r=mysqlcfg

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