Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67134 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88666 invoked from network); 24 Apr 2013 17:19:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Apr 2013 17:19:44 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 108.166.43.99 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 108.166.43.99 smtp99.ord1c.emailsrvr.com Linux 2.6 Received: from [108.166.43.99] ([108.166.43.99:41888] helo=smtp99.ord1c.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 18/C5-60231-F2418715 for ; Wed, 24 Apr 2013 13:19:43 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp5.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id D9B5F1B011B; Wed, 24 Apr 2013 13:19:40 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp5.relay.ord1c.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 89EF51B0120; Wed, 24 Apr 2013 13:19:40 -0400 (EDT) Message-ID: <5178142D.1070204@sugarcrm.com> Date: Wed, 24 Apr 2013 10:19:41 -0700 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Raymond Irving CC: PHP Internals References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Object Type Casting From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! > Are there any plans to add object type casting support in PHP? > > For example: > $circle = (Circle) ShapeFactory::createShape('circle'); > $circle->radius = 10; > echo $circle->getArea(); What is this supposed to do? I.e. what createShape returns and what (Circle) operator is doing to it? > It would be great if this feature could be added to 5.5 :) 5.5 is in feature freeze, so it won't happen in any case. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227