Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119223 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 9966 invoked from network); 3 Jan 2023 09:49:10 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2023 09:49:10 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 47CBB180087 for ; Tue, 3 Jan 2023 01:49:09 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 3 Jan 2023 01:49:08 -0800 (PST) Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-466c5fb1c39so416828357b3.10 for ; Tue, 03 Jan 2023 01:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sensational.ch; s=google; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=cuvDty4L6N47RVVhvO7Z4FKKjRFufx758AJ3kKpUU58=; b=Xq9/0RtO7KNKKWrjPfqyWatoNN9l49rMQAE8DzZfEXgpETzszyLVIL4mNVCFOrQLk9 /opnYgiQPj+0toJY7cOA62fPcBMffnNv7fYTZ/E319uwIn4MdHXrqIEs7mWahr3IrU9d gDoZ45am2pqHAQm4RCadqUUm6CsSdlBMW0LHQWDmBwCL+W5aLpWNgbMaTrNn5PSCyC7t yvk5JByY5cMQyefKzi5SJP2W8i8O+Rf3XzzklD8ymFu3N0hnqUkCxOKgqWvHgEJhEWZZ X2UazvVlvEztHy89vYOXLJYzz7tESqo1qneYVxr6FVRnuTKmFTPf6wz1IMW69LMqSM5Z PwVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=cuvDty4L6N47RVVhvO7Z4FKKjRFufx758AJ3kKpUU58=; b=fyO62yts67DI8qoLszv+R67p90npYD8rd6PUVgj1GTUbtHqYVfuGqFFtasw9IxKr+k JZAgcrcSOMUL8kJ1IgFyGtx4s6whTfpFX795Ak15csuxpBYmoZDKdBKq8r+d89Fc9z0C t5EoER0UOUO9XuSDcPzqkQmX8GzHjvhrv2oklqMCCVKPf1ce7o6/uJA4x3dg2PYYheI7 z8TE1wiWEgWNMGGG2hTij9jlR6ae824FER6pFD966r7RQ0q6M+tpvPbXbIi6JjH3MJH6 xl6jV7PIAH1v2gtTVj01U7LOD0NykDvq4uuJzS89Aao3LKgWAv/LaCCpWCCMArl6UXgC lrsw== X-Gm-Message-State: AFqh2koOTyPqn2zDw61xyNogheCjLQ3bIXABftaD5rNRDVvexwcuF9rP EzeMSFxMZCSIjgoS1pfZ9x++EBSBrgt89BG20CuoAQyCmOvOEgj8ujQ= X-Google-Smtp-Source: AMrXdXv+zR5NT7c6PTd4MkID5GDRQha/j3KcbxunHu2dxRfgkEjqk2mv4OyEfFar2s/SuTV0OPTAamZ+YQKxCqpBr2g= X-Received: by 2002:a81:6884:0:b0:44a:c8fb:93a2 with SMTP id d126-20020a816884000000b0044ac8fb93a2mr3448839ywc.160.1672739347277; Tue, 03 Jan 2023 01:49:07 -0800 (PST) MIME-Version: 1.0 Date: Tue, 3 Jan 2023 10:48:56 +0100 Message-ID: To: PHP internals Content-Type: text/plain; charset="UTF-8" Subject: DateTimeImmutable::modify() return type: doc or language bug? From: phofstetter@sensational.ch (Philip Hofstetter) Hi, `DateTimeImmutable::modify()` is documented as returning `DateTimeImmutable`, but it seems to actually be more specifically returning `static`: https://3v4l.org/j9ZSo Now I'm wondering whether this is a documentation issue (where it should return `static|false` and has not been updated to account for that return type's availability yet) or whether this is a language issue and the method is supposed to be returning `DateTimeImmutable` instead, though that's probably a considerable BC break. If you agree that it's a doc bug, I'll submit a PR. Regards, Philip