Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:63318 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2577 invoked from network); 10 Oct 2012 10:45:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Oct 2012 10:45:04 -0000 Received: from [127.0.0.1] ([127.0.0.1:20528]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id 0D/42-23031-FA155705 for ; Wed, 10 Oct 2012 06:45:04 -0400 Authentication-Results: pb1.pair.com header.from=nicolai.scheer@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nicolai.scheer@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: nicolai.scheer@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:36011] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 0A/F1-23031-26055705 for ; Wed, 10 Oct 2012 06:39:30 -0400 Received: by mail-pb0-f42.google.com with SMTP id ro2so563644pbb.29 for ; Wed, 10 Oct 2012 03:39:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VE0ofiBWdgEir1p0IITj1AeGZm+kMCqhqTx6awz2yzs=; b=SNcVZ41tL9L9yZqwmvAciZTZoSMEAZcRVRMKuG9VdkYh88fDWzk0difREF1rXhZP1K C/50O5wN5K2gyu8SO7fPLD5ZhJaT/pfjyNV5m+xa2mk1pN9fj81f1V9rCpUpsDsfoAUg G0+tFi6N4GhEAqHTI91B341sTZEY5yNpXVFsUZ+gWhhMRFBLChKFjsTmLj6/A0uF261q SsydZa6v6+azq87Aj0O+qzje/52DJGVIix1Dk3ivtjkbydTrE75sDZfV1cCIr2kfM11E 6AVF1p0wOyOh2pro3e401OVY5aZYJQFwHmUUqUJBaBJFLXWMCBdZ7CtF1Y94mK2s4/h3 cj7Q== MIME-Version: 1.0 Received: by 10.68.203.164 with SMTP id kr4mr72425273pbc.46.1349865567674; Wed, 10 Oct 2012 03:39:27 -0700 (PDT) Received: by 10.66.220.105 with HTTP; Wed, 10 Oct 2012 03:39:27 -0700 (PDT) In-Reply-To: References: Date: Wed, 10 Oct 2012 12:39:27 +0200 Message-ID: To: Sherif Ramadan Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] stream_get_line behaviour Bug #63240 From: nicolai.scheer@gmail.com (Nicolai Scheer) Hi again! Thanks for your help an comments on the issue. 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. 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... What do you think? Greetings Nico