Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103532 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 52733 invoked from network); 29 Nov 2018 15:00:34 -0000 Received: from unknown (HELO mail-pl1-f180.google.com) (209.85.214.180) by pb1.pair.com with SMTP; 29 Nov 2018 15:00:34 -0000 Received: by mail-pl1-f180.google.com with SMTP id z23so895136plo.0 for ; Thu, 29 Nov 2018 03:24:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=basereality-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=f8uR2xiEYqjjlay7gedV1wJ6EuB83IAUUYPP5+ehl7Q=; b=dSTx4s6jOzkgjvDb7hq5xqkTBmzSn3q1gOVFiwqZpUnv/WsGctX0kFw/EERgyXaFaF TUyiR0eRM5B70TNbiVuNy1MEx/JeK6w+b8k4T9zlR4U8TTeO/+XCrzMXEEtOpAJ34v/E /NXylMtx7P8vbtY30zU/VEjOwuo9sIk45vXCYBfCPr9PiUC5C6D9RyKZ8pEPeC07QDo5 aqeJu1+O1a326yeNnAbakxT061sGaS5qHaG240Y/lLZZUUk1IJ6bVYN9KxtTqv8/P35L oDUhA5ED8DuObg2N+xMLsFMXRxWvQfhcIWhzaObzcwF6pg/gnVwgd15YTIVNOv02DK5a 6+KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=f8uR2xiEYqjjlay7gedV1wJ6EuB83IAUUYPP5+ehl7Q=; b=J5iN4hGhGgWImCei6Ks5QUeQQoPfGd2MFPGZW3FbPOpPrQ7UHSwhvPVwHau6xcFS72 Oo8I6a3AYcfaVNtZlMQyTp62rpOOC/H4lEeQ9ZNbE2FWiWkJXQSuI49hSdKzmxkOS1ok TYZrOlWBm2mZT8xnH71TR+Nw5fG6AN4UANVxzotztb+LNFLpBDjAcBcjwJ2gGgC7HgmA pq6Q9jnbKqstRMq8A1hAtXEuppqKThckSZ0NW4yJtHmcQItgAh2Vcooqa8NrfO+OvTRn a+Ze7XsVKXsZrSSFcVKrwdvfNLRxRSdLQcy76p4aG4+7QpHIYMshI3aQ6bvCcu1iwwj1 NvDQ== X-Gm-Message-State: AA+aEWaOBb1Yc2WWX88Jauu61RYlopsyV1CKbNe7NZt8bv3QQ8QNBijw Ilw5Lqm0TBPJuAfEE/oiY3kY8Hb8cphrTd8p35hIxdynHtg= X-Google-Smtp-Source: AFSGD/UR1YIIOkiEeZd8dhqDz1AufpHhmwj3KsfGOfP83k2J2yGnzX7NO8rbohuVz+WohgHM8x03lto4fWY0xIpwi8Q= X-Received: by 2002:a17:902:722:: with SMTP id 31mr1055296pli.271.1543490680667; Thu, 29 Nov 2018 03:24:40 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 29 Nov 2018 11:24:29 +0000 Message-ID: To: =?UTF-8?Q?Micha=C5=82_Brzuchalski?= Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Error warning change idea. Was: Don't silence fatal errors From: Danack@basereality.com (Dan Ackroyd) On Thu, 29 Nov 2018 at 09:59, Micha=C5=82 Brzuchalski wrote: > > I don't really know if it fits here but some weeks ago I was thinking abo= ut > annotations with "@" prefix >.... > > Which might work as supress all errors except fatal errors. > > Does that sound like a solution at all? > The developer then has full controll on what errors are suppressed or not= . I was thinking along similar lines a while ago: https://gist.github.com/Danack/5ae0b1b1ce30a0d785dd The reason I never formally suggested it as an RFC is that I think it's doubling down on the wrong solution. The vast majority of places where errors/warning are used currently, could either be just removed or have the result of the function be changed to be a tuple of the current result, and an error flag/message. [$result, $error] =3D foo($bar); if ($error !=3D=3D null) { // something went wrong. } // $result is usable cheers Dan