Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:105639 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93763 invoked from network); 8 May 2019 10:37:26 -0000 Received: from unknown (HELO mail1.25mail.st) (206.123.115.54) by pb1.pair.com with SMTP; 8 May 2019 10:37:26 -0000 Received: from [10.0.1.86] (unknown [49.48.243.197]) by mail1.25mail.st (Postfix) with ESMTPSA id DABD7603CE; Wed, 8 May 2019 07:41:23 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) In-Reply-To: Date: Wed, 8 May 2019 14:41:20 +0700 Cc: Gert , PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <5D1AF0DF-4C0E-4BCC-8D5D-DFF0F388E6F9@koalephant.com> References: To: Claude Pache X-Mailer: Apple Mail (2.3445.104.8) Subject: Re: [PHP-DEV] Error instead of returning false From: php-lists@koalephant.com (Stephen Reay) > On 7 May 2019, at 22:15, Claude Pache wrote: >=20 > If you do think that ideally an exception should be thrown here, it is = better to devise a new function=E2=80=94and, while you=E2=80=99re at it, = a function that returns an object of some definite class instead of a = resource. Isn=E2=80=99t this exactly what SplFileObject / SplFileInfo::openFile is = for?