Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14744 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88700 invoked by uid 1010); 9 Feb 2005 09:32:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 88685 invoked from network); 9 Feb 2005 09:32:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Feb 2005 09:32:20 -0000 X-Host-Fingerprint: 83.97.50.139 jan.prima.de FreeBSD 4.6-4.9 Received: from ([83.97.50.139:1941] helo=jan.prima.de) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 07/97-19196-2A8D9024 for ; Wed, 09 Feb 2005 04:32:19 -0500 Received: from BAUMBART (pD95F85D3.dip.t-dialin.net [::ffff:217.95.133.211]) (IDENT: HydraIRC, AUTH: LOGIN tobi) by jan.prima.de with esmtp; Wed, 09 Feb 2005 09:32:14 +0000 Date: Wed, 9 Feb 2005 10:30:14 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1062509740.20050209103014@marcus-boerger.de> To: Ante Drnasin CC: internals@lists.php.net In-Reply-To: <20050207141916.21665.qmail@lists.php.net> References: <20050207141916.21665.qmail@lists.php.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Autoboxing in php 5.1 From: helly@php.net (Marcus Boerger) 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:helly@php.net