Re: [PHP-DEV] Re: [RFC] New custom object serialization mechanism

2019-03-06 Thread Nikita Popov
On Mon, Mar 4, 2019 at 9:18 PM Marc wrote: > > On 04.03.19 10:08, Nikita Popov wrote: > > On Mon, Mar 4, 2019 at 6:31 AM Marc wrote: > > > >> (sorry for top posting) > >> > >> Hi Nikita, > >> > >> as for the question about magic methods vs. interface. > >> > >> I have the feeling that it could b

Re: [PHP-DEV] Re: [RFC] New custom object serialization mechanism

2019-03-04 Thread Marc
On 04.03.19 10:08, Nikita Popov wrote: On Mon, Mar 4, 2019 at 6:31 AM Marc wrote: (sorry for top posting) Hi Nikita, as for the question about magic methods vs. interface. I have the feeling that it could be done with both in a clean way to make both parties happy. 1. Having __serialize

Re: [PHP-DEV] Re: [RFC] New custom object serialization mechanism

2019-03-04 Thread Nikita Popov
On Mon, Mar 4, 2019 at 6:31 AM Marc wrote: > (sorry for top posting) > > Hi Nikita, > > as for the question about magic methods vs. interface. > > I have the feeling that it could be done with both in a clean way to > make both parties happy. > > > 1. Having __serialize/ __unserialize as magic me

Re: [PHP-DEV] Re: [RFC] New custom object serialization mechanism

2019-03-03 Thread Marc
(sorry for top posting) Hi Nikita, as for the question about magic methods vs. interface. I have the feeling that it could be done with both in a clean way to make both parties happy. 1. Having __serialize/ __unserialize as magic methods - allowing to throw exceptions also to explicitly di