Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123452 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 65FB91A009C for ; Tue, 28 May 2024 19:29:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1716924642; bh=73I9FpYfvb/OAxa/B8cesUbAXL8o05/BZ7+VJKBlkyM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Hstr3NTRL6ypX/9A46HarAKOUqntigpp16PbHmN+kfIVSdfJngvucxcJTJzMq8oD9 WYs2TzZrUW+SwTV2VWcr3Qmxjxv0sKIJWOXW0zPfrS8EMVIw9gR+TSUnqEY93KgyrO EnAEOxpKPlkb7ZPAeo57T3zYU81xNRBTepwF4KDQWEMKvk3j8Qxnb5zP/jat1nvH/v ZG1wiuZn8R6fj0JQSAlhU6djTv3t2PIrHztN5TsYoY2TEtG2DpFyd83RolqgwkkXml BZ0H7X5RfujkXrO0NXuJAWRDcDdkx/GnR4w9ASWnvB6a8UYnYL1AHRCgyOgsAMWKDg /yg9ljsZ/V/rA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DC1B4180722 for ; Tue, 28 May 2024 19:30:40 +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,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 ; Tue, 28 May 2024 19:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1716924578; bh=ZyOQTgweDu0JopF18ktDZuGi4S8kKT4vYDyEy6YFXFI=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=gqU8E2ubo2B5LSApJHr5Rei7P3IWyOGZrqbJpkDOWdbwg9t4c9Yhw9hdHa/m5B2if 4XB0OKb1ei/UOqETdj+dFvnuP4trPrY+PXocdW60tSAGinnVIE79G3SXpc5Tx1oF/c hdIO5UUWOIfCL3unDWRS5pAvgFnJALqRC5collorX4xlv0qLN/hAlU99Bqqq2tou5v xdBB3uW9IWeI2Fuw2PRELfWeVZmJrUr8OtzR6XR7z25EMPrSm7ScBgJ5Y5JV7zY1Ae TCfmHR1FE5GJgo82eiK9e/mPayiBDHr9Ur9EdK2VSjL+jBc/duko9EtXGVLd6OezW1 aqvWXuwTcFmTQ== Message-ID: <9c69992e-2962-476d-baca-aa51bdd0f1f7@bastelstu.be> Date: Tue, 28 May 2024 21:29:36 +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: Derick Rethans , Ilija Tovilo 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/28/24 16:26, Derick Rethans wrote: > I have just checked this for Xdebug, and you're definitely right with > that. With the removal of the ZEND_EXIT opcode, it can not now detect a > scope/function exit now. Can you clarify why ZEND_EXIT is special for Xdebug when compared to any other function that unconditionally throws or unconditionally calls exit(); by itself, i.e. any other function with a `never` return type? > It also breaks my "do tasks on ZEND_EXIT" with the profiler. It is used > to always write the closing profiling footer to the files. Without me > being able to overload thati opcode, data would not be complete. > I even have two bugs (with tests) for this: > > - https://bugs.xdebug.org/68 > - https://bugs.xdebug.org/631 Likewise, how is ZEND_EXIT special here? How does it work differently than a script that runs to completion without calling exit(); or a script that fails, e.g. due to an uncaught exception or due to reaching the memory limit? Best regards Tim Düsterhus