Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63325 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21648 invoked from network); 10 Oct 2012 13:52:46 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2012 13:52:46 -0000 Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.220.42 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.220.42 mail-pa0-f42.google.com Received: from [209.85.220.42] ([209.85.220.42:63590] helo=mail-pa0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/C5-23031-CAD75705 for ; Wed, 10 Oct 2012 09:52:45 -0400 Received: by mail-pa0-f42.google.com with SMTP id fa1so612582pad.29 for ; Wed, 10 Oct 2012 06:52:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=+SKoU4fxIJlbR/myByQR33zfb5NFYfcfePoyBwbm2Cc=; b=J6MpbFslkKXpYJdRRkvZVj2rxNLsu5CHnnepzm8/1GQfub3Jin3/Pyj984az8Zru8U mJLD/pHs5hkpRdLoK07P975X8M4+eoq8KvVHi2W+yevTyglsKBLvmVX93fRIPxw+L+DE lZwj7TXNySXnIYNC6uSubhVG+NpmALPr5D88zf6j5+VFaomg9nC4+lrh6mkQrxuGiRjf 3QqQ+HPUjUtc0sGDbHHM/9GfRRo8N/Ufe2voemrGU7mbU/g+eOy9cFurL1JgwAwd7dSc gpCt9qwqHBTMgeE5+iif3uW+LHUhnXhDPBelzaSg7Ozo1WXy7it+V5dTQSKGZHomgS8P CXAw== Received: by 10.68.233.196 with SMTP id ty4mr18990858pbc.23.1349877162078; Wed, 10 Oct 2012 06:52:42 -0700 (PDT) Received: from [192.168.1.104] (bb42-60-29-211.singnet.com.sg. [42.60.29.211]) by mx.google.com with ESMTPS id o1sm894927pax.21.2012.10.10.06.52.39 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Oct 2012 06:52:41 -0700 (PDT) References: In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-ID: Cc: Sherif Ramadan , "internals@lists.php.net" X-Mailer: iPhone Mail (9B206) Date: Wed, 10 Oct 2012 21:52:37 +0800 To: Nicolai Scheer Subject: Re: [PHP-DEV] stream_get_line behaviour Bug #63240 From: tjerk.meesters@gmail.com (Tjerk Meesters) Sent from my iPhone On 10 Oct, 2012, at 6:39 PM, Nicolai Scheer wrote= : > Hi again! >=20 > Thanks for your help an comments on the issue. >=20 > cataphract commented on the stream_get_line behaviour (returning false > when used on an empty file) on the bug report page. > I do agree that reading on an empty file can be considered an error > thus returning false, because there's nothing to read. >=20 > Unfortunately, and that's why we stumbled upon this in the first > place, feof does not return true when opening an empty file. > I did not have a look at the internals, but my guess is that feof just > does not return true because no one did a read on the file handle yet. > To my mind if would be sensible to return true using feof on an empty > file, so that one does not actually try a read... That wouldn't be right. Technically the EOF should be discovered, not deduce= d from other information like stat(). Also, some streams don't support repor= ting an appropriate size.=20 >=20 > What do you think? >=20 > Greetings >=20 > Nico >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20