Reply to Re: Binary-safe?

Your name:

Reply:


Posted by Taras_96 on 01/26/07 13:49

> | To add to the confusion, other websites suggest that 'binary-safe'
> | simply implies that the function can operate on the given data without
> | altering it.
>
> why is that confusing? not only is it correct in this context, but there are
> other meanings of 'binary-safe' in programming.

The manual entry for strcoll states that:

"Note that this comparison is case sensitive, and unlike strcmp() this
function is not binary safe."

I doubt that strcoll alters the data it is given in some way, so I
don't see how it wouldn't be binary safe if you use the definition that
unsafe functions alter data.

Compare this with the functions file(), which is unsafe because it
reads each line into a new elt of the array, effectively destroying the
newline characters, and file_get_contents, which is safe because it
reads the data into the string (it doesn't destroy the data).

It seems here that two different definitions of binary-safe are being
used. Is this an example of the 'other meanings' you mentioned?

Taras

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация