Derick Rethans wrote:
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.

We create images in PHP scripts and pass them through with readfile("foo,gif"). Did I understand correctly that this would still work without changes? But echo file_get_contents("foo.gif") would fail, right?

This is not a complaint, just trying to understand the implications,
- Chris

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

Reply via email to