Hello Internals,
now that we got rid of the unicode.semantics switch, should we change
var_dump("foo") from showing 'unicode(3) "foo"' back to 'string(3) "foo"'
as it is the new string type and change the other output to show 'binary'
which it is now? And long those lines should we change all occurances of
the 'u' prefix to instead show a 'b' prefix if non usnice? All in all I
would prefer to reflect the real situation, the new string type is unicode
capable but named 'string' and the old stuff is binary data and hence
called 'binary'. And when entering strings we have a b prefix but no u
prefix. This would affect a ton of tests but we need to fix run-tests and
most tests anyway. For one, we need to drop all --UEXPECT*-- blocks.
Best regards,
Marcus
Hi Marcus,
now that we got rid of the unicode.semantics switch, should we change
var_dump("foo") from showing 'unicode(3) "foo"' back to 'string(3) "foo"'
as it is the new string type and change the other output to show 'binary'
which it is now? And long those lines should we change all occurances of
the 'u' prefix to instead show a 'b' prefix if non usnice? All in all I
would prefer to reflect the real situation, the new string type is unicode
capable but named 'string' and the old stuff is binary data and hence
called 'binary'. And when entering strings we have a b prefix but no u
prefix. This would affect a ton of tests but we need to fix run-tests and
most tests anyway. For one, we need to drop all --UEXPECT*-- blocks.
I have about 3000 tests ready to commit, but obviously if 'u'/'unicode' is
going too there'll be a bit more work to do on them.
I've covered Zend/tests, /tests and a chunk of ext/standard/tests over the
last week.
- Steph
Best regards,
Marcus
now that we got rid of the unicode.semantics switch, should we change
var_dump("foo") from showing 'unicode(3) "foo"' back to 'string(3)
"foo"'
as it is the new string type and change the other output to show
'binary'
which it is now?
I'd say that var_dump("foo") should give 'unicode(3) "foo"' and
var_dump(b"foo") should give 'binary(3) "foo"'. I see no reason not to
give the explicit type — why would anything rely on this for backwards
compatibility?
--
Geoffrey Sneddon
<http://gsnedders.com/