Re: [RFC] Context Managers

From: Date: Wed, 05 Nov 2025 07:06:55 +0000
Subject: Re: [RFC] Context Managers
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-129082@lists.php.net to get a copy of this message
Hello all. > Have you considered returning enum instead of ?bool? It would have a clear self explanatory > meaning. You don’t need to return anything at all. :) PHP already has throw. That means the cleanup method can throw an exception if it decides one should be thrown. This behavior is fully consistent with PHP’s design, and there’s no need for a return statement. -- Ed

« previous php.internals (#129082) next »