Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124168 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by qa.php.net (Postfix) with ESMTPS id 5C1A81A009C for ; Mon, 1 Jul 2024 22:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719874421; bh=yMO1z7us2JDN6dOba1srtaVVTMdrVaMP+DIyJFQwx7Q=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=FjxjNyxEo4Zn29RmjoGd3vXS0SckllYLIGDBLnx2MreMB687DRrK9MF+dm5ApPdDs ho8Q05ouYjhLFNDAxPy7bDRReNaFaJjmcZqIXKmDqZvy7dGn9/OtaESW4kBDMvwCag P+aCg6IFbAe5tLtCjKJA+NQcfwy0l+QrI+pGPDW7DDNyOE3SY7161xKvMNEnENH1IK xawZNIbnmgwB8H3/faST1/02gzISF/SpFFw5ZIx54Y7QRI5heHEfeK0JQQLmHUfibP BiIgFTMAS0GtUmSJtOrWuEhnuEheEhqoyZVC4Q4Dkf9S1ywLxAOLCrOaeBU/jeaYs2 Gb0OT/ybUi7fw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 127C918006E for ; Mon, 1 Jul 2024 22:53:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-vs1-f48.google.com (mail-vs1-f48.google.com [209.85.217.48]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Mon, 1 Jul 2024 22:53:40 +0000 (UTC) Received: by mail-vs1-f48.google.com with SMTP id ada2fe7eead31-48f550b29d7so1039801137.1 for ; Mon, 01 Jul 2024 15:52:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719874339; x=1720479139; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yMO1z7us2JDN6dOba1srtaVVTMdrVaMP+DIyJFQwx7Q=; b=Eiuw8yYtrHmttf5m+8rbOvJBFEGnFe0aNY4X619dlk6uhGZ+TozSZInBZM+SeeTuyl bkL3PpW6alqjcMEMOtJvnqUyQDqNkPJvuFo/f7KuUEECewBMbM38IYNj3gvvbtfzt4O/ A5x3XUCb92QeUMEViXGjjl5HM2pFhKHUV+Gi8mRSVdtR65jQUsfAI8DQDhgRc2reLf4S e/24AIpz8vwsJLxiExRAj3mXaPSBfEN5fDwMX+r8Lc/TWUtmtOW435YQ+zhjpoB4yTqM 0F1mdfWybZyFHk5kc4IEyNoM3tJqEy2xgu7455cZeCsrBpo12K3xZCH7Mv++/T5LcRnU vaMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719874339; x=1720479139; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yMO1z7us2JDN6dOba1srtaVVTMdrVaMP+DIyJFQwx7Q=; b=jhIxQG1JM0OmBfhii9/EpVPwbgH//RMdiVmkgsMiYrlStM2ogWp/PCTEtB9RofY1ia Pik/CfAGSB18GlldIYCWs4uzFWEChCyC8eEe2THolKB+8DTwtKYXyxvrFuvKxs30sW2M 4NUh8ufnJRTcXFP1fGM7qsScXEKgf/RlC0rBgjf9t3o13rXMNc3fslGkxR/BTV9QiYi4 QoLWcrXfSBY8S7Qs1X3wwJChnlyIhE3TJpC+0teNBixfCC9WzbDkE8ZnTRNeZamia/Qx cqvcIV6/GPeYRvV5VNRrTUCA46xBgf0RRSXuvVvAJrkDljZZ4wcFZmvJ3Dz3PSgkphDW UCeQ== X-Forwarded-Encrypted: i=1; AJvYcCVS5VVfqRIrFhVjw+Jn714eWgDQ2rI7BH9OqIrC+cKZl4UOXdLmP5+k1nnPEJUbTet+uig+Ku3kHTtmv2XmM4DR1448BqOq8g== X-Gm-Message-State: AOJu0YxMM/sqaawbVvhnupjV8sWJFRySF9JJzHen3bN+GHWrNc2mPbYa 0ImIxiHf9uXGInajJNSquNJEtN8BAIoWX4fAtnsE4jPd92eKEmOJ8k6w2ZX1U0eg3H5senPtv4z +oR+Sdzn/T5+Gu6SwpmJmaOblcqw= X-Google-Smtp-Source: AGHT+IG8uAndlmFHjKMxFCu22bEiU4CiwY5nPaPi7xKQPxBwvsI2i97jZ564JYxuQCJjL6X3mrBUUlNaqFmLMtyUWEA= X-Received: by 2002:a05:6102:3174:b0:48f:47b6:91ae with SMTP id ada2fe7eead31-48faf06ba79mr7335802137.1.1719874339038; Mon, 01 Jul 2024 15:52:19 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 1 Jul 2024 16:52:08 -0600 Message-ID: Subject: Re: [PHP-DEV] Re: [Discussion] Add date_test_set_now() function To: Jorg Sowa Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="000000000000096c0e061c3773a1" From: lnearwaju@gmail.com (Lanre) --000000000000096c0e061c3773a1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jul 1, 2024 at 2:21=E2=80=AFPM Jorg Sowa wrot= e: > > You don=E2=80=99t make any effort to help or provide constructive criti= cism; you > just love to (incorrectly) tell everyone what they're doing wrong and how > they should be doing it, without adding anything constructive to the > conversation. > > Please limit to the arguments on the topic, not a person. > > The argument "Relying on the global mutable state is a bug" is completely > valid and in most of the cases is the signal of bad design. And it has be= en > already addressed in some of the functions, look at > https://wiki.php.net/rfc/deprecations_php_8_3 for deprecations on rand > functions. However, it's not so trivial to fix everything introducing > compatibility-breaking changes. So it shouldn't be advised to add more of > such functions. > > Kind regards, > Jorg > It still doesn't make sense. Even if we removed all the functions from my list, the entire engine remains filled with global state. Internal zend_class_entry instances, arginfo macros, the interned string table, executor/compiler/scanner/each-extension globals, and so on=E2=80=94all con= tribute to global state -- or bugs according to you and Larry, unless your stupid argument applies only to languages under your control. Do I think it always makes sense to use global state? Absolutely not. But I won't go as far as to imply that relying on 'global mutable state' inevitably leads to bugs. Cheers, Lanre --000000000000096c0e061c3773a1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jul 1, 2024 at 2:21=E2=80=AFP= M Jorg Sowa <jorg.sowa@gmail.com<= /a>> wrote:
<= div dir=3D"ltr">Jorg
<= /div>

It still doesn't make sense. Even= if we removed all the functions from my list, the entire engine remains fi= lled with global state. Internal zend_class_entry instances, arginfo macros= , the interned string table, executor/compiler/scanner/each-extension globa= ls, and so on=E2=80=94all contribute to global state -- or bugs according t= o you and Larry, unless your stupid argument applies only to languages unde= r your control. Do I think it always makes sense to use global state? Absol= utely not. But I won't go as far as to imply that relying on 'globa= l mutable state' inevitably leads to bugs.

Cheers,
Lanre=C2=A0
--000000000000096c0e061c3773a1--