Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114878 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 44838 invoked from network); 15 Jun 2021 07:34:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Jun 2021 07:34:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B26D81804D1 for ; Tue, 15 Jun 2021 00:51:08 -0700 (PDT) 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f181.google.com (mail-lj1-f181.google.com [209.85.208.181]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 15 Jun 2021 00:51:08 -0700 (PDT) Received: by mail-lj1-f181.google.com with SMTP id c11so23726365ljd.6 for ; Tue, 15 Jun 2021 00:51:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qf96/NuSD37W59aqKdVh4BuqHsAoZzbkZnaqH3JEU6I=; b=IvaQM6k7qU9mOdwV0Bib8LjXfGzRCKJWgt523PM1nACjkuFY3U9Bltkg3kS0SIaXwv 1F7mnOgEUL4Q9bQzUd/UpQ4hZBZw7Cv/wbzsODUvZYmlx2kR2CkkMNHbjQIQJ+R6EZn7 jYc3qpd6pZyCuFikr6gt+QqEtkShVLWfG00s6rnPIDLZqISAFwdqZWiIMSomqZHdJyxo rEjR+EoLrl3hdpYebTHfOdH0MpixyMMrZdHPaa6wxFc9rYaxvpuo4soW87yY9/+MfRnr Z5exgTLNAM5WmA13kjwDmekdQ0qqzPwigsPOpsGWcMkkbpyB73gGtSxCALlSFeyt+FZt +VEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qf96/NuSD37W59aqKdVh4BuqHsAoZzbkZnaqH3JEU6I=; b=fwm+zA12VgxB9n7cFxqPwzjwhwCmlzSQg9ly5pq//PFdCMyJopElatno8hUR5ycp72 heG+MJZEbUnDm1O+6kFnzo8u6q0LoR++bXCgdWYqMMHXZ0jMELYVq2uj03mnmuH8VC6e YK/dh8u+vD2jy1q5QuljbZvUvFjNCsXMaaByYK2ns8x//ss0NtOhYn+pCKJxRkleB0gH 8cMn3IcoKgVYEm2ygZZAUDHaDrCvvcgprPVKVsu2qY0BuNUm05sqgE38v/FZs/HyNb69 /9f2RCPld9rSd3mwNZE6BhO4PS3W1+gOqNH+9nMaup8Sfx1zfz2zgU26xrrKy1IrvEl5 RRQg== X-Gm-Message-State: AOAM5320CU3XzQQKgabJBE0U1gur4usDabGNgSpZr4F+kX0RfNCLgnmK BuDFoEWozOsIiyAWq4CnnF9Y8HilMlBmdlMh31o= X-Google-Smtp-Source: ABdhPJy6qIBO3X+NZeCD/PRI1V+giDcKLs5Jjp0rYdntiHNVNekDt1s3WjigJkumIys7jcWpHvp3s3ky3aEbgTlHxPI= X-Received: by 2002:a05:651c:604:: with SMTP id k4mr16837270lje.244.1623743465694; Tue, 15 Jun 2021 00:51:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 15 Jun 2021 09:50:49 +0200 Message-ID: To: Claude Pache Cc: Marco Pivetta , PHP internals Content-Type: multipart/alternative; boundary="0000000000007aaa0005c4c93c5b" Subject: Re: [PHP-DEV] Allow objects in define() From: nikita.ppv@gmail.com (Nikita Popov) --0000000000007aaa0005c4c93c5b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 15, 2021 at 8:44 AM Claude Pache wrote= : > > > > Not sure about specific use cases, for me the important aspect here is to > avoid arbitrary restrictions. For example, define() accepts resources, an= d > this is used for some core constants like STDIN, STDOUT, STDERR. > > > Per the documentation [1], defining resource constants is supposed to > =E2=80=9Ccause unpredictable behavio[u]r=E2=80=9D and is =E2=80=9Cnot rec= ommended=E2=80=9D. Is this correct > or just FUD? > Well, at least I'm not aware of any "unpredictable behavior" it could cause. I wouldn't recommend it either -- but that's more because I would recommend against most uses of define(), not so much resources in particular. Regards, Nikita --0000000000007aaa0005c4c93c5b--