Hi Rowan,
On Thu, Feb 6, 2014 at 4:36 AM, Rowan Collins <[email protected]>wrote:
>
> You seem to misunderstand what __set_state() is for. It is for reliably
>>> >representing a value so that you can "include" it's contents with
>>> >var_export(). If 5.6 would suddenly start spitting out
>>> >Class::__setState() instead of Classs::__set_state() then older PHP
>>> >versions can't parse/include that outputted data anymore.
>>> >
>>>
>> I have to check code, but don't we have options for this?
>> We may use __set_state() for var_export and still have alias as
>> __setState.
>> People are using var_export exchange PHP data, so we should be careful.
>> I agree this.
>>
>
> Is there a use case for __set_state *other than* var_export()?
>
> In other words, if not var_export(), what code would ever include a
> reference to __setState() if it were added as an alias?
My bad.
var_export() does not specify method, so it can alias safely.
Regards,
--
Yasuo Ohgaki
[email protected]