Hello Ante,

  autoboxing is an ugly java 1.5 workarount to enable storage of base
tyoes in containers. There this trick is necessary because as always
in java everything must be an 'Object'. In contrast PHP is a loosly
typed language where a container aka array can store any type. Apart
from that as with java there is no user space enabled way to implement
such autoboxing types and even the java way of building it into the
engine is not supported and won't be.

regards
marcus

Monday, February 7, 2005, 3:21:59 PM, you wrote:

> I was wondering if anyone can comment on this idea
> cause I think it would be a great asset to PHP and to OOP in PHP..

> example:

> $b = 4;
> $a = new Integer(4);

> if($a == $b) {
>     //bla bla
> }

> Other classes would include String(), Integer(), Boolean() ... and so on...




-- 
Best regards,
 Marcus                            mailto:[EMAIL PROTECTED]

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to