On Fri, 3 May 2002 [EMAIL PROTECTED] wrote:
[..]
> Well, I assumed that the overhead wouldn't be too significant, but I
> admit I didn't do any measurements whatsoever. Is there any existing
> good benchmark, or should I just loop a million times through a few
> random lines of code and measure this?
Yup :)
>
> > Back when Andi moved zval.value.strlen and zval.value.strval into
> > the str struct, thus saving 4 bytes in the zval struct, PHP 3 was
> > generally speeded up by 25%.
>
> WHAT??? Well, since this would add them back again... :-(
>
> > Not sure if the PHP 4 or PHP 5 overhead will be in the same
> > ballpark, but it's something to think about.
>
[..]
> method name for objects that would - if it exists - be called when
> that object should be converted to a string?
>
> class Date {
> function __to_string($type) {
> # return a string with $this formatted as $type string
> }
> }
> $date = new Date();
> echo xml"<date>$date</date>";
>
> Hmmmm...??
Please... no operator overloading. This was discussed before, and AFAIK
the consensus was a no on this.
Derick
---------------------------------------------------------------------------
Did I help you? http://www.amazon.co.uk/exec/obidos/registry/SLCB276UZU8B
Frequent ranting: http://www.jdimedia.nl/derick/
---------------------------------------------------------------------------
PHP: Scripting the Web - [EMAIL PROTECTED]
All your branches are belong to me!
SRM: Script Running Machine - www.vl-srm.net
---------------------------------------------------------------------------
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php