[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] [doc-en] master: fixed invalid class name, and sample output.
From:       Yoshinari Takaoka <noreply () php ! net>
Date:       2022-08-25 13:51:36
Message-ID: 1z5u8gMWgP1574oKrJhYcV0O4Op971pJK4wfxmC8g () main ! php ! net
[Download RAW message or body]

Author: Yoshinari Takaoka (mumumu)
Date: 2022-08-25T22:54:01+09:00

Commit: https://github.com/php/doc-en/commit/d5229ff0241bd6df01f4035d0038fc6f37bf5f1e
Raw diff: https://github.com/php/doc-en/commit/d5229ff0241bd6df01f4035d0038fc6f37bf5f1e.diff

fixed invalid class name, and sample output.

s/DateImmutable/DateTimeImmutable/

https://3v4l.org/4XS4W

Changed paths:
  M  reference/datetime/formats.xml


Diff:

diff --git a/reference/datetime/formats.xml b/reference/datetime/formats.xml
index 13fb2325d31..b4cd4c7d214 100644
--- a/reference/datetime/formats.xml
+++ b/reference/datetime/formats.xml
@@ -94,19 +94,19 @@ array(1) {
      <programlisting role="php">
 <![CDATA[
 <?php
-$res = DateImmutable::createFromFormat("Y-m-d", "2015-09-34");
+$res = DateTimeImmutable::createFromFormat("Y-m-d", "2015-09-34");
 var_dump($res);
 ]]>
      </programlisting>
      &example.outputs;
      <screen>
 <![CDATA[
-class DateTime#1 (3) {
-  public $date =>
+object(DateTimeImmutable)#1 (3) {
+  ["date"]=>
   string(26) "2015-10-04 17:24:43.000000"
-  public $timezone_type =>
+  ["timezone_type"]=>
   int(3)
-  public $timezone =>
+  ["timezone"]=>
   string(13) "Europe/London"
 }
 ]]>

-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic