Re: Reclassifying some PHP functions warning as exceptions

From: Date: Mon, 21 Oct 2019 17:19:43 +0000
Subject: Re: Reclassifying some PHP functions warning as exceptions
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-107608@lists.php.net to get a copy of this message
On 21/10/2019 17:02, Rowan Tommins wrote:
- They immediately jump control out of the current frame of execution. Unless you put a separate "try-catch" around every line, there is no "acknowledge and run next line".
I've been toying with the idea of: $x = tryval fopen('missing.txt', 'r'),
            FileException => null;
if ($x === null) { die('File could not be opened.'); } -- Mark Randall

« previous php.internals (#107608) next »