Re: T_CONCAT_EQUAL operator and object's write/read handlers
| From: | Pierre Joye | Date: | Fri, 30 May 2008 21:26:55 +0000 |
| Subject: | Re: T_CONCAT_EQUAL operator and object's write/read handlers | ||
| References: | 1 2 3 4 5 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5481@lists.php.net to get a copy of this message | ||
On Fri, May 30, 2008 at 11:00 PM, Piotr Pokora <piotrek.pokora@gmail.com> wrote:
> Pierre Joye writes:
>
> Hi!
>
>> ++ for example will do a property read followed by a property write.
>> .= should work too, you only don't know that a .= is being executed
>> (unlike a->f=1).
>
> I just realized that ++ doesn't work for properties of integer type.
> Neither $obj->prop++ or ++$obj->prop.
It's been a long time since the last time I was using that. You can
see some old code in pecl's cvs, the datetime module. If I'm not
mistaken, it does work with ++/-- and I did some trick to allow non
linear increment (like end of the month will reset the day to 1 and
increment the month).
Cheers,
--
Pierre
http://blog.thepimp.net | http://www.libgd.org