Re: Object Type Casting
| From: | Stas Malyshev | Date: | Wed, 24 Apr 2013 17:19:41 +0000 |
| Subject: | Re: Object Type Casting | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-67134@lists.php.net to get a copy of this message | ||
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