]> granicus.if.org Git - php/commitdiff
More consistent parameter names for date/time functions
authorDerick Rethans <github@derickrethans.nl>
Fri, 24 Jul 2020 10:39:46 +0000 (11:39 +0100)
committerDerick Rethans <github@derickrethans.nl>
Fri, 24 Jul 2020 10:49:01 +0000 (11:49 +0100)
Zend/tests/parameter_default_values/internal_declaration_error_int.phpt
Zend/tests/parameter_default_values/internal_declaration_error_null.phpt
Zend/tests/type_declarations/variance/internal_parent.phpt
ext/date/php_date.stub.php
ext/date/php_date_arginfo.h
ext/reflection/tests/internal_parameter_default_value/ReflectionParameter_toString_Internal.phpt

index 599ff6162afa2a5f189363028c8e762620bc8789..c32cc9e41fbc1006b60855131bb25f8470f3a187 100644 (file)
@@ -4,9 +4,10 @@ The default value is an integer in the parent class method's signature.
 <?php
 class MyDateTime extends DateTime
 {
-    public function setTime(int $hour, int $minute, int $second = 0, bool $microseconds = false)
+    public function setTime(int $hour, int $minute, int $second = 0, bool $microsecond = false)
     {
     }
 }
+?>
 --EXPECTF--
-Fatal error: Declaration of MyDateTime::setTime(int $hour, int $minute, int $second = 0, bool $microseconds = false) must be compatible with DateTime::setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) in %s on line %d
+Fatal error: Declaration of MyDateTime::setTime(int $hour, int $minute, int $second = 0, bool $microsecond = false) must be compatible with DateTime::setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0) in %s on line %d
index e03e0394d68bd1cc3273f66b572d664367ff7d7e..3804c2a6e1557e002475fe6118bbc18ddc54a4cb 100644 (file)
@@ -8,5 +8,6 @@ class MyDateTime extends DateTime
     {
     }
 }
+?>
 --EXPECTF--
-Fatal error: Declaration of MyDateTime::createFromFormat() must be compatible with DateTime::createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null) in %s on line %d
+Fatal error: Declaration of MyDateTime::createFromFormat() must be compatible with DateTime::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null) in %s on line %d
index 5b44630e9e194bc52b82eb0ec34cc427d9461aa4..c82e10ffc34d55357b83053ff1567f50b06000d8 100644 (file)
@@ -4,9 +4,9 @@ Internal class as parent
 <?php
 
 class Test extends DateTime {
-    public static function createFromFormat($format, $time, Wrong $timezone = null) { }
+    public static function createFromFormat($format, $datetime, Wrong $timezone = null) { }
 }
 
 ?>
 --EXPECTF--
-Fatal error: Could not check compatibility between Test::createFromFormat($format, $time, ?Wrong $timezone = null) and DateTime::createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null), because class Wrong is not available in %s on line %d
+Fatal error: Could not check compatibility between Test::createFromFormat($format, $datetime, ?Wrong $timezone = null) and DateTime::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null), because class Wrong is not available in %s on line %d
index ac5f2c9331058bad258f6cb9562b4661148a825e..626906180a5e2b17adc6f93f4e96573ea3e59e79 100644 (file)
@@ -2,7 +2,7 @@
 
 /** @generate-function-entries */
 
-function strtotime(string $time, ?int $now = null): int|false {}
+function strtotime(string $datetime, ?int $now = null): int|false {}
 
 function date(string $format, ?int $timestamp = null): string {}
 
@@ -11,14 +11,14 @@ function idate(string $format, ?int $timestamp = null): int|false {}
 function gmdate(string $format, ?int $timestamp = null): string {}
 
 function mktime(
-    int $hour, ?int $min = null, ?int $sec = null,
-    ?int $mon = null, ?int $day = null, ?int $year = null): int|false {}
+    int $hour, ?int $minute = null, ?int $second = null,
+    ?int $month = null, ?int $day = null, ?int $year = null): int|false {}
 
 function gmmktime(
-    int $hour, ?int $min = null, ?int $sec = null,
-    ?int $mon = null, ?int $day = null, ?int $year = null): int|false {}
+    int $hour, ?int $minute = null, ?int $second = null,
+    ?int $month = null, ?int $day = null, ?int $year = null): int|false {}
 
-function checkdate(int $m, int $d, int $y): bool {}
+function checkdate(int $month, int $day, int $year): bool {}
 
 function strftime(string $format, ?int $timestamp = null): string|false {}
 
@@ -30,26 +30,26 @@ function localtime(?int $timestamp = null, bool $associative = false): array {}
 
 function getdate(?int $timestamp = null): array {}
 
-function date_create(string $time = "now", ?DateTimeZone $timezone = null): DateTime|false {}
+function date_create(string $datetime = "now", ?DateTimeZone $timezone = null): DateTime|false {}
 
 function date_create_immutable(
-    string $time = "now", ?DateTimeZone $timezone = null): DateTimeImmutable|false {}
+    string $datetime = "now", ?DateTimeZone $timezone = null): DateTimeImmutable|false {}
 
 function date_create_from_format(
-    string $format, string $time, ?DateTimeZone $timezone = null): DateTime|false {}
+    string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false {}
 
 function date_create_immutable_from_format(
-    string $format, string $time, ?DateTimeZone $timezone = null): DateTimeImmutable|false {}
+    string $format, string $datetime, ?DateTimeZone $timezone = null): DateTimeImmutable|false {}
 
-function date_parse(string $date): array {}
+function date_parse(string $datetime): array {}
 
-function date_parse_from_format(string $format, string $date): array {}
+function date_parse_from_format(string $format, string $datetime): array {}
 
 function date_get_last_errors(): array|false {}
 
 function date_format(DateTimeInterface $object, string $format): string {}
 
-function date_modify(DateTime $object, string $modify): DateTime|false {}
+function date_modify(DateTime $object, string $modifier): DateTime|false {}
 
 function date_add(DateTime $object, DateInterval $interval): DateTime {}
 
@@ -62,10 +62,10 @@ function date_timezone_set(DateTimeInterface $object, DateTimeZone $timezone): D
 function date_offset_get(DateTimeInterface $object): int {}
 
 function date_diff(
-    DateTimeInterface $object, DateTimeInterface $object2, bool $absolute = false): DateInterval {}
+    DateTimeInterface $object1, DateTimeInterface $object2, bool $absolute = false): DateInterval {}
 
 function date_time_set(
-    DateTime $object, int $hour, int $minute, int $second = 0, int $microseconds = 0): DateTime {}
+    DateTime $object, int $hour, int $minute, int $second = 0, int $microsecond = 0): DateTime {}
 
 function date_date_set(DateTime $object, int $year, int $month, int $day): DateTime {}
 
@@ -94,7 +94,7 @@ function timezone_abbreviations_list(): array {}
 
 function timezone_version_get(): string {}
 
-function date_interval_create_from_date_string(string $time): DateInterval|false {}
+function date_interval_create_from_date_string(string $datetime): DateInterval|false {}
 
 function date_interval_format(DateInterval $object, string $format): string {}
 
@@ -103,16 +103,16 @@ function date_default_timezone_set(string $timezone_identifier): bool {}
 function date_default_timezone_get(): string {}
 
 function date_sunrise(
-    int $time, int $retformat = SUNFUNCS_RET_STRING,
+    int $timestamp, int $retformat = SUNFUNCS_RET_STRING,
     ?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
     float $gmt_offset = 0): string|int|float|false {}
 
 function date_sunset(
-    int $time, int $retformat = SUNFUNCS_RET_STRING,
+    int $timestamp, int $retformat = SUNFUNCS_RET_STRING,
     ?float $latitude = null, ?float $longitude = null, ?float $zenith = null,
     float $gmt_offset = 0): string|int|float|false {}
 
-function date_sun_info(int $time, float $latitude, float $longitude): array {}
+function date_sun_info(int $timestamp, float $latitude, float $longitude): array {}
 
 // NB: Adding return types to methods is a BC break!
 // For now only using @return annotations here.
@@ -139,7 +139,7 @@ interface DateTimeInterface
 
 class DateTime implements DateTimeInterface
 {
-    public function __construct(string $time = "now", ?DateTimeZone $timezone = null) {}
+    public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null) {}
 
     public function __wakeup() {}
 
@@ -155,7 +155,7 @@ class DateTime implements DateTimeInterface
      * @return DateTime|false
      * @alias date_create_from_format
      */
-    public static function createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null) {}
+    public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null) {}
 
     /**
      * @return array|false
@@ -173,7 +173,7 @@ class DateTime implements DateTimeInterface
      * @return DateTime|false
      * @alias date_modify
      */
-    public function modify(string $modify) {}
+    public function modify(string $modifier) {}
 
     /**
      * @return DateTime
@@ -209,7 +209,7 @@ class DateTime implements DateTimeInterface
      * @return DateTime
      * @alias date_time_set
      */
-    public function setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) {}
+    public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0) {}
 
     /**
      * @return DateTime
@@ -221,7 +221,7 @@ class DateTime implements DateTimeInterface
      * @return DateTime
      * @alias date_isodate_set
      */
-    public function setISODate(int $year, int $week, int $day = 1) {}
+    public function setISODate(int $year, int $week, int $day_of_week = 1) {}
 
     /**
      * @return DateTime
@@ -244,7 +244,7 @@ class DateTime implements DateTimeInterface
 
 class DateTimeImmutable implements DateTimeInterface
 {
-    public function __construct(string $time = "now", ?DateTimeZone $timezone = null) {}
+    public function __construct(string $datetime = "now", ?DateTimeZone $timezone = null) {}
 
     public function __wakeup() {}
 
@@ -255,7 +255,7 @@ class DateTimeImmutable implements DateTimeInterface
      * @return DateTimeImmutable|false
      * @alias date_create_immutable_from_format
      */
-    public static function createFromFormat(string $format, string $time, ?DateTimeZone $timezone = null) {}
+    public static function createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null) {}
 
     /**
      * @return array|false
@@ -294,7 +294,7 @@ class DateTimeImmutable implements DateTimeInterface
     public function diff(DateTimeInterface $object, bool $absolute = false) {}
 
     /** @return DateTimeImmutable|false */
-    public function modify(string $modify) {}
+    public function modify(string $modifier) {}
 
     /** @return DateTimeImmutable */
     public function add(DateInterval $interval) {}
@@ -306,13 +306,13 @@ class DateTimeImmutable implements DateTimeInterface
     public function setTimezone(DateTimeZone $timezone) {}
 
     /** @return DateTimeImmutable */
-    public function setTime(int $hour, int $minute, int $second = 0, int $microseconds = 0) {}
+    public function setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0) {}
 
     /** @return DateTimeImmutable */
     public function setDate(int $year, int $month, int $day) {}
 
     /** @return DateTimeImmutable */
-    public function setISODate(int $year, int $week, int $day = 1) {}
+    public function setISODate(int $year, int $week, int $day_of_week = 1) {}
 
     /** @return DateTimeImmutable */
     public function setTimestamp(int $timestamp) {}
@@ -377,7 +377,7 @@ class DateInterval
      * @return DateInterval|false
      * @alias date_interval_create_from_date_string
      */
-    public static function createFromDateString(string $time) {}
+    public static function createFromDateString(string $datetime) {}
 
     /**
      * @return string
index 158f3784e023b2ba949f5e90cc6c778e1757a0c6..58e0faee53178fe71235568273f7f3c0849564bd 100644 (file)
@@ -1,8 +1,8 @@
 /* This is a generated file, edit the .stub.php file instead.
- * Stub hash: d1a39515c3457e71f6a00d2bb406ad5c79564e7e */
+ * Stub hash: dbb98fcf9462d309d4276ba76cfbbe20172d2f30 */
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, now, IS_LONG, 1, "null")
 ZEND_END_ARG_INFO()
 
@@ -20,9 +20,9 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mktime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, min, IS_LONG, 1, "null")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, sec, IS_LONG, 1, "null")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, mon, IS_LONG, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, minute, IS_LONG, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, second, IS_LONG, 1, "null")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, month, IS_LONG, 1, "null")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, day, IS_LONG, 1, "null")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, year, IS_LONG, 1, "null")
 ZEND_END_ARG_INFO()
@@ -30,9 +30,9 @@ ZEND_END_ARG_INFO()
 #define arginfo_gmmktime arginfo_mktime
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_checkdate, 0, 3, _IS_BOOL, 0)
-       ZEND_ARG_TYPE_INFO(0, m, IS_LONG, 0)
-       ZEND_ARG_TYPE_INFO(0, d, IS_LONG, 0)
-       ZEND_ARG_TYPE_INFO(0, y, IS_LONG, 0)
+       ZEND_ARG_TYPE_INFO(0, month, IS_LONG, 0)
+       ZEND_ARG_TYPE_INFO(0, day, IS_LONG, 0)
+       ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strftime, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
@@ -55,34 +55,34 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_getdate, 0, 0, IS_ARRAY, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create, 0, 0, DateTime, MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_STRING, 0, "\"now\"")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, datetime, IS_STRING, 0, "\"now\"")
        ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create_immutable, 0, 0, DateTimeImmutable, MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_STRING, 0, "\"now\"")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, datetime, IS_STRING, 0, "\"now\"")
        ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create_from_format, 0, 2, DateTime, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
        ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_create_immutable_from_format, 0, 2, DateTimeImmutable, MAY_BE_FALSE)
        ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
        ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_parse, 0, 1, IS_ARRAY, 0)
-       ZEND_ARG_TYPE_INFO(0, date, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_parse_from_format, 0, 2, IS_ARRAY, 0)
        ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, date, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_get_last_errors, 0, 0, MAY_BE_ARRAY|MAY_BE_FALSE)
@@ -95,7 +95,7 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_modify, 0, 2, DateTime, MAY_BE_FALSE)
        ZEND_ARG_OBJ_INFO(0, object, DateTime, 0)
-       ZEND_ARG_TYPE_INFO(0, modify, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, modifier, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_add, 0, 2, DateTime, 0)
@@ -119,7 +119,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_offset_get, 0, 1, IS_LONG,
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_diff, 0, 2, DateInterval, 0)
-       ZEND_ARG_OBJ_INFO(0, object, DateTimeInterface, 0)
+       ZEND_ARG_OBJ_INFO(0, object1, DateTimeInterface, 0)
        ZEND_ARG_OBJ_INFO(0, object2, DateTimeInterface, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, absolute, _IS_BOOL, 0, "false")
 ZEND_END_ARG_INFO()
@@ -129,7 +129,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_time_set, 0, 3, DateTime, 0)
        ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, second, IS_LONG, 0, "0")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microsecond, IS_LONG, 0, "0")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_date_date_set, 0, 4, DateTime, 0)
@@ -196,7 +196,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_timezone_version_get, 0, 0, IS_S
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_OBJ_TYPE_MASK_EX(arginfo_date_interval_create_from_date_string, 0, 1, DateInterval, MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_interval_format, 0, 2, IS_STRING, 0)
@@ -211,7 +211,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_date_default_timezone_get arginfo_timezone_version_get
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_date_sunrise, 0, 1, MAY_BE_STRING|MAY_BE_LONG|MAY_BE_DOUBLE|MAY_BE_FALSE)
-       ZEND_ARG_TYPE_INFO(0, time, IS_LONG, 0)
+       ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, retformat, IS_LONG, 0, "SUNFUNCS_RET_STRING")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, latitude, IS_DOUBLE, 1, "null")
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, longitude, IS_DOUBLE, 1, "null")
@@ -222,7 +222,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_date_sunset arginfo_date_sunrise
 
 ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_date_sun_info, 0, 3, IS_ARRAY, 0)
-       ZEND_ARG_TYPE_INFO(0, time, IS_LONG, 0)
+       ZEND_ARG_TYPE_INFO(0, timestamp, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO(0, latitude, IS_DOUBLE, 0)
        ZEND_ARG_TYPE_INFO(0, longitude, IS_DOUBLE, 0)
 ZEND_END_ARG_INFO()
@@ -246,7 +246,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_class_DateTimeInterface___wakeup arginfo_class_DateTimeInterface_getTimezone
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime___construct, 0, 0, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, time, IS_STRING, 0, "\"now\"")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, datetime, IS_STRING, 0, "\"now\"")
        ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null")
 ZEND_END_ARG_INFO()
 
@@ -266,7 +266,7 @@ ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_createFromFormat, 0, 0, 2)
        ZEND_ARG_TYPE_INFO(0, format, IS_STRING, 0)
-       ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
        ZEND_ARG_OBJ_INFO_WITH_DEFAULT_VALUE(0, timezone, DateTimeZone, 1, "null")
 ZEND_END_ARG_INFO()
 
@@ -275,7 +275,7 @@ ZEND_END_ARG_INFO()
 #define arginfo_class_DateTime_format arginfo_class_DateTimeInterface_format
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_modify, 0, 0, 1)
-       ZEND_ARG_TYPE_INFO(0, modify, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, modifier, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_add, 0, 0, 1)
@@ -296,7 +296,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setTime, 0, 0, 2)
        ZEND_ARG_TYPE_INFO(0, hour, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO(0, minute, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, second, IS_LONG, 0, "0")
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microseconds, IS_LONG, 0, "0")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, microsecond, IS_LONG, 0, "0")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setDate, 0, 0, 3)
@@ -308,7 +308,7 @@ ZEND_END_ARG_INFO()
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setISODate, 0, 0, 2)
        ZEND_ARG_TYPE_INFO(0, year, IS_LONG, 0)
        ZEND_ARG_TYPE_INFO(0, week, IS_LONG, 0)
-       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, day, IS_LONG, 0, "1")
+       ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, day_of_week, IS_LONG, 0, "1")
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateTime_setTimestamp, 0, 0, 1)
@@ -396,7 +396,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateInterval___construct, 0, 0, 1)
 ZEND_END_ARG_INFO()
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_class_DateInterval_createFromDateString, 0, 0, 1)
-       ZEND_ARG_TYPE_INFO(0, time, IS_STRING, 0)
+       ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0)
 ZEND_END_ARG_INFO()
 
 #define arginfo_class_DateInterval_format arginfo_class_DateTimeInterface_format
index 6697232869e8bfe94752be8f4a8eddc81c0ddc62..6c7701d5c07b094b9331ee4c9eac5296c95ec06b 100644 (file)
@@ -22,7 +22,7 @@ foreach ($method->getParameters() as $parameter) {
 Parameter #0 [ <required> int $hour ]
 Parameter #1 [ <required> int $minute ]
 Parameter #2 [ <optional> int $second = 0 ]
-Parameter #3 [ <optional> int $microseconds = 0 ]
+Parameter #3 [ <optional> int $microsecond = 0 ]
 ----------
 Parameter #0 [ <optional> int $what = DateTimeZone::ALL ]
 Parameter #1 [ <optional> ?string $country = null ]