Re: [patch] __string() method
| From: | (Marcus B�rger) | Date: | Tue, 02 Sep 2003 09:59:29 +0000 |
| Subject: | Re: [patch] __string() method | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-4348@lists.php.net to get a copy of this message | ||
Hello Jon,
Tuesday, September 2, 2003, 10:29:11 AM, you wrote:
JP> Attached is a fairly simple (and rough) patch that adds support for a
JP> "special" __string() object method to ZE2. I wrote it for fun, but I
JP> thought there might be general interest in the idea, so I'm posting it
JP> here. The idea is inspired by Python's __str__ method [1].
First why not name it toString() since for now we have consensus on sudlyCaps.
But i didn't bother with names yet when i made this patch:
http://marcus-boerger.de/php/ext/ze2/ze2-iterators-20030902.diff.txt
Second i think you should use the cast facility like i did in my patch.
Best regards,
Marcus mailto:helly@php.net