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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to