Req #70265 [Com]: Rename DateTimeImmutable::__construct's object param to "timezone"
| From: | ocramius at gmail dot com | Date: | Fri, 14 Aug 2015 08:19:17 +0000 |
| Subject: | Req #70265 [Com]: Rename DateTimeImmutable::__construct's object param to "timezone" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-195199@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70265&edit=1
ID: 70265
Comment by: ocramius at gmail dot com
Reported by: ocramius at gmail dot com
Summary: Rename DateTimeImmutable::__construct's object param
to "timezone"
Status: Open
Type: Feature/Change Request
Package: Date/time related
PHP Version: 7.0.0beta3
Block user comment: N
Private report: N
New Comment:
Good point! I guess it is a documentation change issue then? The parameter has always been
documented as
timezone, as far as I can see.
Previous Comments:
------------------------------------------------------------------------
[2015-08-14 07:35:08] requinix@php.net
Sure you're not looking at the HHVM output? They named it "timezone" but PHP has
always called it "object".
------------------------------------------------------------------------
[2015-08-14 07:25:44] ocramius at gmail dot com
Description:
------------
As per http://3v4l.org/6Wc78,
DateTimeImmutable::__construct.timezone was renamed to DateTimeImmutable::__construct.object
Test script:
---------------
<?php
echo (new ReflectionMethod('DateTimeImmutable',
'__construct'))->getParameters()[1]->getName();
Expected result:
----------------
timezone
Actual result:
--------------
object
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70265&edit=1