# BC an' all that

- Thread: https://externals.io/message/37836
- Original archive: https://news-web.php.net/php.internals/37836
- Started by Steph Fox on 2008-05-23T17:38:24+00:00
- Messages: 4
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #37836 — Steph Fox — 2008-05-23T17:38:24+00:00

URL: https://externals.io/message/37836#37836

Hi all,

Tony's not alone, I'm also playing with PHP 6 today.

As Edward mentioned when I started talking about the upgrade path, we don't 
have a way to cope with the (binary)|(b) cast prior to PHP 5.2.1. It's 
arguable that most people will have access to PHP > 5.2.1, but that's not 
100% useful if you have something you'd like to 'just work' regardless of 
other peoples' updates. Personally I'm stuck with the choice of making the 
default phar stub forward compatible or backward compatible - there's no way 
to do both.

Can someone please explain why (string) isn't a pseudonym for (binary) in 
PHP 6.0? There's probably a very good reason and I'm just not seeing it... 
but it would go a long way to solving the problem if it were.

- Steph

---

## #37838 — Andrei Zmievski — 2008-05-23T18:50:22+00:00

URL: https://externals.io/message/37836#37838 · In reply to: #37836

Because the majority of use cases involving strings do not involve 
binary strings. Or, as Rasmus said, "logic".

-Andrei

Steph Fox wrote:
> Hi all,
> 
> Tony's not alone, I'm also playing with PHP 6 today.
> 
> As Edward mentioned when I started talking about the upgrade path, we 
> don't have a way to cope with the (binary)|(b) cast prior to PHP 5.2.1. 
> It's arguable that most people will have access to PHP > 5.2.1, but 
> that's not 100% useful if you have something you'd like to 'just work' 
> regardless of other peoples' updates. Personally I'm stuck with the 
> choice of making the default phar stub forward compatible or backward 
> compatible - there's no way to do both.
> 
> Can someone please explain why (string) isn't a pseudonym for (binary) 
> in PHP 6.0? There's probably a very good reason and I'm just not seeing 
> it... but it would go a long way to solving the problem if it were.
> 
> - Steph

---

## #37840 — Steph Fox — 2008-05-23T19:53:05+00:00

URL: https://externals.io/message/37836#37840 · In reply to: #37838

> Because the majority of use cases involving strings do not involve 
> binary strings. Or, as Rasmus said, "logic".

Not strings, *casts* to string.

Or is there no way to differentiate between them?

- Steph
> 
> -Andrei

---

## #37841 — Andrei Zmievski — 2008-05-23T19:53:57+00:00

URL: https://externals.io/message/37836#37841 · In reply to: #37840

That would be a major WTF factor for me: strings are unicode but 
(string) is binary.

-Andrei

Steph Fox wrote:
> > […]
> 
> Not strings, *casts* to string.
> 
> Or is there no way to differentiate between them?
> 
> - Steph
> > […]
