Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119224 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 31523 invoked from network); 3 Jan 2023 15:07:09 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 3 Jan 2023 15:07:09 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 459531804B0 for ; Tue, 3 Jan 2023 07:07:08 -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=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS29838 64.147.123.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) (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 07:07:07 -0800 (PST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 796FC3200926 for ; Tue, 3 Jan 2023 10:07:06 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute4.internal (MEProxy); Tue, 03 Jan 2023 10:07:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1672758426; x= 1672844826; bh=IIhMXsEffWFVDx2SiHSGaY7bqta4Ylmh+TBJ8ZSJ4/U=; b=b Ojej4xLZXnLlkQPMGc56NoYGVVVd9WPdEu4lMJPDwYPTL1FQDE5mhb2Fa2oxShMm /AoTHJu7mv5fwZ+yxS6nWOArOXBx6Wt6fVpI84eYrsSCMxd4Z/UztbfTsnZB0p5w LURYQcQNvOgp35Ut4cucfkfmk5QK4mBR+IsgC61OoT/U4/+oYOmSXdbdnA+eRINw aXdI6dtYogWBYVhTNTILbIMaeyS5STH6oHhEPct9eGvyT2qf/5DBbdz8nvjre8hk EQ+f/9UQW8In3mwRK0vuj8e6EztJYB8lIrexilyDIOvhLikA+eYBHl3wnnZnNGML IOr7Ele4bIN4A7Nz549MQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1672758426; x=1672844826; bh=IIhMXsEffWFVDx2SiHSGaY7bqta4 Ylmh+TBJ8ZSJ4/U=; b=Fjud9vuObUTPazhhPsbUWFHSTw9GimiiEKWARnkEMUXL R5ByztQL4cbf44BQBhltsI2tSZmmju6BvrUMsTUviRgapfGRvZryRCRWA5xNfcyG kfjrykxQ3IFSFFHFvs4kGVezrjVTeg6VKswAVUfTfJXFQZNELlaYD9P3sFefgDny MnAsebbi5py7hxPMI9Wr0mgHsD+mepEOE1tQ7ckcw3iU/AL7bZSmUCmt5V01Stzv UKVJUASobyKwGYI7MLHtcvC+8Zs3uXwpGoObOEKT1PHmnXojlgI6dauyqUGla0Qo b55+/iN1jYegcEKDG9UEKP39EAvXQNBicmlEBCFGpg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrjeeggdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenog fuuhhsphgvtghtffhomhgrihhnucdlgeelmdenucfjughrpefofgggkfgjfhffhffvufgt sehttdertderredtnecuhfhrohhmpedfnfgrrhhrhicuifgrrhhfihgvlhgufdcuoehlrg hrrhihsehgrghrfhhivghlughtvggthhdrtghomheqnecuggftrfgrthhtvghrnhepfeel ueeltdfggeevheekgffhhedtkeetteeggeefudekvefhueeikeelhfdtheeunecuffhomh grihhnpeefvheglhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhep mhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B25021700097; Tue, 3 Jan 2023 10:07:05 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-1185-g841157300a-fm-20221208.002-g84115730 Mime-Version: 1.0 Message-ID: <5a7b476b-9106-41eb-bdcb-77027043301a@app.fastmail.com> In-Reply-To: References: Date: Tue, 03 Jan 2023 09:06:45 -0600 To: "php internals" Content-Type: text/plain Subject: Re: [PHP-DEV] DateTimeImmutable::modify() return type: doc or language bug? From: larry@garfieldtech.com ("Larry Garfield") On Tue, Jan 3, 2023, at 3:48 AM, Philip Hofstetter wrote: > 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 That sounds like a doc bug to me. It's likely the doc page hasn't been updated since before the `static` return was added. The code looks like it's doing the right thing. Doc PR, please and thank you! --Larry Garfield