intelephense

1.14.41.16.1
lib/stub/date/date.php
lib/stub/date/date.php
+36−3
Index: package/lib/stub/date/date.php
===================================================================
--- package/lib/stub/date/date.php
+++ package/lib/stub/date/date.php
@@ -528,9 +528,9 @@
  * The year is between 1 and 32767 inclusive.
  * </p>
  * @return bool true if the date given is valid; otherwise returns false.
  */
-#[Pure(true)]
+#[Pure]
 function checkdate(int $month, int $day, int $year): bool {}
 
 /**
  * Format a local time/date according to locale settings
@@ -1001,11 +1001,25 @@
  * @param DateTimeZone|null $timezone [optional]
  * @return DateTimeImmutable|false
  */
 #[Pure(true)]
-function date_create_immutable_from_format(string $format, string $datetime, ?DateTimeZone $timezone): DateTimeImmutable|false {}
+#[StubsElementAvailable(from: '5.5', to: '7.4')]
+function date_create_immutable_from_format(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTimeImmutable|false {}
 
 /**
+ * Returns new DateTimeImmutable object formatted according to the specified format
+ * @link https://php.net/manual/en/function.date-create-immutable-from-format.php
+ * @param string $format
+ * @param string $datetime
+ * @param DateTimeZone|null $timezone [optional]
+ * @return DateTimeImmutable|false
+ * @throws ValueError when the datetime contains NULL-bytes.
+ */
+#[Pure(true)]
+#[StubsElementAvailable(from: '8.0')]
+function date_create_immutable_from_format(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTimeImmutable|false {}
+
+/**
  * Alias:
  * {@see DateTime::createFromFormat}
  * @link https://php.net/manual/en/function.date-create-from-format.php
  * @param string $format Format accepted by  <a href="https://secure.php.net/manual/en/function.date.php">date()</a>.
@@ -1017,11 +1031,30 @@
  * @return DateTime|false <p> Returns a new
  * {@see DateTime} instance or <b>FALSE</b> on failure.</p>
  */
 #[Pure(true)]
-function date_create_from_format(string $format, string $datetime, ?DateTimeZone $timezone): DateTime|false {}
+#[StubsElementAvailable(from: '5.3', to: '7.4')]
+function date_create_from_format(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false {}
 
 /**
+ * Alias:
+ * {@see DateTime::createFromFormat}
+ * @link https://php.net/manual/en/function.date-create-from-format.php
+ * @param string $format Format accepted by  <a href="https://secure.php.net/manual/en/function.date.php">date()</a>.
+ * <p>If format does not contain the character ! then portions of the generated time which are not specified in format will be set to the current system time.</p>
+ * <p>If format contains the character !, then portions of the generated time not provided in format, as well as values to the left-hand side of the !, will be set to corresponding values from the Unix epoch.</p>
+ * <p>The Unix epoch is 1970-01-01 00:00:00 UTC.</p>
+ * @param string $datetime String representing the time.
+ * @param DateTimeZone|null $timezone [optional] A DateTimeZone object representing the desired time zone.
+ * @return DateTime|false <p> Returns a new
+ * {@see DateTime} instance or <b>FALSE</b> on failure.</p>
+ * @throws ValueError when the datetime contains NULL-bytes.
+ */
+#[Pure(true)]
+#[StubsElementAvailable(from: '8.0')]
+function date_create_from_format(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false {}
+
+/**
  * Returns associative array with detailed info about given date
  * @link https://php.net/manual/en/function.date-parse.php
  * @param string $datetime <p>
  * Date in format accepted by strtotime.