Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127334 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 lists.php.net (Postfix) with ESMTPS id C2C731A00BC for ; Sun, 11 May 2025 14:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746974443; bh=TIUh6uJBdo9HI/F/i1ZXl7tHodW+kRHLBKTXJ2ovtFI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kdKK94ldM5HWNWn7j7LM0XY6SptJshDoEX7++kd49xEFWGlW+eRUMcyL0HVeiQIkO oj69dF1XIAPipE+F9Mn/A+y+l36Zq2NAbgbporIr/u6Kdkau2hnsw1hs51rvOpKjPk 7INHvqcwN9dsYIo7XIGQRRtUNDfmAewdDyo4KKfxXVGcuC/4vZulb84gJDrEQV4Lwb MGQzEKr8oMPqobCTqet8R3x7RTEbvO5DUvX8Y2vsrcekWEOGd6O+9mMswpLuSHpXmp s2ZGHocAlJXwI+cSG5FXFyA7lFlNJ0lJ9mIce3A+sStt0/lTeIao0G+uU9iAXEOUnd WTqhBkrLIiT8Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 930F118004F for ; Sun, 11 May 2025 14:40:42 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS 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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 ; Sun, 11 May 2025 14:40:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1746974573; bh=96s43L0MegwByIEpxoIlZuwVfl5Ko9L8mqfay03jeBk=; h=MIME-Version:Date:From:To:Cc:Subject:In-Reply-To:References: Message-ID:Content-Type:from:to:cc:subject:message-id; b=SsWjHbelBJCdkaueQnYpcrphOfvZuLx3GBUv946n3UmM1BHsY2E9Zyr1Jwl9JbYxD QpMi99HZwwlqK/tqvnGdTsL8rOu3PZ97DbEwqakKUfkOLR9IKe2j68vBJjOGOH8fuN /KRHvdrj/VT+tlyQrA9xGozL9NU06EyIUAEHsaeWsp/f39mm1ruoBOoFxVr8ECmZbh NtbS3I1JHzdAW99r3QV4gD+pXVNNxt40DXUbeVY9grcAjByFhzC+5e2XcQm4o4V5TZ aTSoBL/YenKzsH9UQ54SW5RTetJ1s8UHjv2Zu9V73H6ucEy0kiNLXNAb3NW+3KsO6G E5zNHKVlZ05xA== Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Sun, 11 May 2025 16:42:53 +0200 To: "Gina P. Banyard" Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Disallow dynamic calls to assert()? In-Reply-To: References: <7d47ba135b9ff6f88caa23cc5638dc5d@bastelstu.be> Message-ID: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi Am 2025-05-11 15:35, schrieb Gina P. Banyard: > This makes sense to me, I don't really see why one would ever need to > call assert dynamically. > Is it possible to prevent retrieving a closure by using the FCC syntax > at compile time? There was some disagreement on the PR about whether or not dynamic calls should be disallowed, thus changing it would require an RFC, which I'm not planning to do (too much effort for something users are unlikely to run into in the first place). Thus also not investigating whether or not an implementation would need to look like. I'll merge the PR making dynamic `assert()` a noop as a bugfix, though: https://github.com/php/php-src/pull/18521#issuecomment-2869905393 Best regards Tim Düsterhus