Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119978 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52553 invoked from network); 12 Apr 2023 16:31:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 Apr 2023 16:31:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 49749180559 for ; Wed, 12 Apr 2023 09:31:55 -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_H3,RCVD_IN_MSPIKE_WL,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-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 ; Wed, 12 Apr 2023 09:31:51 -0700 (PDT) Received: by mail-ej1-f41.google.com with SMTP id sg7so41741639ejc.9 for ; Wed, 12 Apr 2023 09:31:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681317110; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=vh08G/kRU7oF/yGKTp2WIvUwmQYVlHZ1QBUIXUmcLzQ=; b=X3dDePbmpI3YZCEzB8tud2QkBQb1VtaGAKns7eAB8jYxx8cB/HrrG3PgPdh0bEE+ms eEytiNY79rsPq6FxL69BMOdWcLeBVgXNULntLCARBa4I3tmATug6RF9bNL8A7tTqor92 hTspa1CF0TTkCUeyoHuAbqnWErav98GF0L4KAW7dBwW6PpNYpBnxtDKAKUeDtYY5wB3d NSDneico0sF1U6b+t08beMrrpfjwc8/H6pRfwXN/i07TfEnTJOcffGRvcq6jAzLNhNGi l8HXLZyiJ9eYw9txMFLM60OgKod5ScJTVh/FVBHBsqldl2imDV+3QuLxCHicphRADCWk z5jQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681317110; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vh08G/kRU7oF/yGKTp2WIvUwmQYVlHZ1QBUIXUmcLzQ=; b=bVc+qzGbOCDuumA0yetMIdVoF/wT9xoC9x6fZhLfWHzqC0QfuS6bw8lyd4yN+F8wNm zVnSY7h997XmM4KMD2bR82NY/zAKA6zLTaYEKDuuFDpJnvI1otgHms+j1vJtzxceM869 xxOSHyg/9l3FPnU1yJ0Ayi81B+oqf8oFjVpvo3iSXdlwaZpEjWDlFLZIDXPe4vQtqOnH k5hWwIoklDD7zVpsM4N3dg47qeJevBGYeD7zjI/HpY7vvYVYQFksYaOqVlUqOw8M9K/8 9iPHAdHP+b93cFFa0ZIpIm7vTMXXb6oSh1NMqqYdQP4ap45vOsAHd89iXdn6abGaRuvv kMwQ== X-Gm-Message-State: AAQBX9efq7RRkeql7mqSGVQAA6F9LaB6jyXS0a0YxsiABbZiQlYCp0s8 tSc5fjwv4H02gV5m6s/KC0c= X-Google-Smtp-Source: AKy350YVd/mYuJOSXm/nGaeueXnQjBwwgQ5EsCK9Bq8x0jy4abU4uboSUvqe1GsMXwPVKTSj6QiXkA== X-Received: by 2002:a17:906:b1d7:b0:933:868:413a with SMTP id bv23-20020a170906b1d700b009330868413amr15778281ejb.15.1681317110458; Wed, 12 Apr 2023 09:31:50 -0700 (PDT) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id ib6-20020a1709072c6600b0094a5acf32ccsm4211296ejc.53.2023.04.12.09.31.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Apr 2023 09:31:50 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_84780BA5-C67F-40E0-82E2-67219196C4A5" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Date: Wed, 12 Apr 2023 18:31:39 +0200 In-Reply-To: Cc: PHP internals To: "G. P. B." References: X-Mailer: Apple Mail (2.3731.500.231) Subject: Re: [PHP-DEV] [RFC] New core autoloading mechanism with support for function autoloading From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_84780BA5-C67F-40E0-82E2-67219196C4A5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 10 avr. 2023 =C3=A0 14:17, G. P. B. a = =C3=A9crit : >=20 > Hello Internals, >=20 > Dan and I would like to propose a new core autoloading mechanism that = fixes > some minor design issues with the current class autoloading mechanism = and > introduce a brand-new function autoloading mechanism: > https://wiki.php.net/rfc/core-autoloading >=20 Hi, 1. The proposed modification of `function_exists()` will break existing = code: as soon as a `bar()` function is defined in global scope, with no = obvious hint why it suddenly broke. You should either (from my = increasing order of preference): * acknowledge it in the =E2=80=9CBackward Incompatible Changes=E2=80=9D = section; * default the $autoload extra parameter to `false`; * keep the current semantics, that using a namespaced or qualified = function name, (including a function name given as string, which is = implicitly fully qualified), doesn=E2=80=99t fall back to the global = scope, =E2=80=94 even when a previous use of the same function name did = trigger the fall back, see: https://3v4l.org/mnVWO (Independently of any = mechanism introduced to avoid to repeatedly trigger the function = autoloader.) 2. If you add function autoloading, you ought to support constant = autoloading as well, of course. =E2=80=94Claude= --Apple-Mail=_84780BA5-C67F-40E0-82E2-67219196C4A5--