Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123303 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 187021A009C for ; Fri, 10 May 2024 16:32:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715358819; bh=sFIzrIPlvYp/2g4C5kvdO90QbGe52/hgMsLydQiparw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ETGXIDkyeAoDQsRWXbWRuylKOO3+9+sBiSRzRcx5V1McG+4a+wHMdgEjqB8GUgV+C uvTsz/aCjq6Woly57gYnWihBIx9LMBiPLKfFyclCvbZzAH50Inxk/Ax8jvF4Hm/XUq 14VJMff7Enke14HTr+2xFBgUK9AFjBDSe67TaSISCW91cuahhGoGpFnBcVGptRvG0a kis2Awv7HCDcf/0BGib7rVyuVdE38D4MPIYrdcWEIHep2e9LM8uDD4GEj4CpWSOoyC yQ98LWUrTpJSBekeF6BA7CdJwA7N1WtwmJmnnka7vr26hkeQBMhw8rKBxL8oh8p4OL 6NKyNtbb15cww== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 42EA5180086 for ; Fri, 10 May 2024 16:33:37 +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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 10 May 2024 16:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1715358764; bh=lYuCtpQf/wtk/k8wGSM1a7zehUT4DpT8WKcKBtQ5jLQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=IQnwg9eoXsWEU6EhLIg3dpLDKFJUPfffSg+aGjAxYHNdaNyrPVbXVv3MisfCrQVnC lOjpZbHtrucKkLJVljy6FDDgPZeh4PEEhRQ/opjOUb3XfQfrPTyFj/UQ7wPhBxvdP4 WbAfc/GgAR0NSNM90n5eCDFPJXpXgd2HTFYtMMTbToGq7OJopslMFTKYohs7zm7u9Z oM3bpPMP5SaJeL+VQaBZAoPfh17HzvX16LvhJ0LLBoi0fmgDUpFotEFg5TTpkT3qgJ jOimkSZtDL7pNG9aHIK+5cfeJ3ZT1Dmps6MW8iWxSsSqsQHOg0K/sbXpqJFvLh87cs Boxih+UF3puOQ== Message-ID: <10b83bef-b019-4bbe-b97f-5cc9100cbf07@bastelstu.be> Date: Fri, 10 May 2024 18:32:44 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] Transform exit() from a language construct into a standard function To: Saki Takamachi , "Gina P. Banyard" Cc: PHP internals References: Content-Language: en-US In-Reply-To: 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 On 5/9/24 17:18, Saki Takamachi wrote: > Is it nonsense to always stop processing even if an error occurs? Or, how about creating an uncatchable exception class specifically for exits? Or is this level of risk negligible? > This is already the case. `exit` throws an internal uncatchable Exception. Quoting from the RFC: > Finally, the need for exit() to be a language construct with its own dedicated opcode is not a requirement any more since PHP 8.0 as the opcode throws a special kind of exception which cannot be caught, 2) nor executes finally blocks, to unwind the stack normally. Best regards Tim Düsterhus