Marcus Boerger schrieb:
  to be honest this is the wrong way. The correct way of fixing this is to
have PHP 6 name it correct: string and binary. And to have b for binary

Aside from the question of how to write a portable test, here is an example speaking for your argument of making a distinction between binary (strings) and strings (= always unicode) in the var_dump()/print_r()/etc. output of PHP 6.

In early PHP 6 days var_dump((binary)"PHP") has printed "string", like PHP 5 does. And in earlier versions of PHP 6 var_dump("PHP") has printed "unicode". There was a distinction between the two types of strings in PHP 6.

That was nice, because it was simple to test if SELECT varbinary_column really returned a binary (string) or a (unicode) string.

Ulf

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

Reply via email to