Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64460 invoked by uid 1010); 10 Aug 2005 11:01:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 64445 invoked from network); 10 Aug 2005 11:01:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Aug 2005 11:01:32 -0000 X-Host-Fingerprint: 82.94.239.5 jdi.jdi-ict.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:33908] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 3B/F9-24081-A8ED9F24 for ; Wed, 10 Aug 2005 07:01:30 -0400 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j7AB1QbI010921 for ; Wed, 10 Aug 2005 13:01:26 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j7AB1NRE010907; Wed, 10 Aug 2005 13:01:23 +0200 Date: Wed, 10 Aug 2005 13:01:23 +0200 (CEST) X-X-Sender: derick@localhost To: Ron Korving cc: internals@lists.php.net In-Reply-To: <1B.49.24081.1DAD9F24@pb1.pair.com> Message-ID: References: <937066F0-AA5F-41E2-99A0-D74C7F44FFCA@gravitonic.com> <1B.49.24081.1DAD9F24@pb1.pair.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdi-ict.nl Subject: Re: [PHP-DEV] Re: PHP Unicode support design document From: derick@php.net (Derick Rethans) On Wed, 10 Aug 2005, Ron Korving wrote: > "In order to create binary string literals, a new syntax is necessary: > prefixing a string literal with letter 'b' creates a binary string." > > The b-prefix for binary strings is great, but how does that work with a > function like file_get_contents() or fread() ? > One can't do: $data = bfile_get_contents("somefile.bin"); fopen() and file_get_contents() already understands a context parameter, specifying whethter you'd want to have binary or string/unicode data can be done through that. and the b syntax, only works for literal strings in your code: b"foo", but b$foo is not going to work. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org