I suppose your cast is a conversion. Otherwise it is not needed at all
because PHP has no types.


-----Ursprüngliche Nachricht-----
Von: Raymond Irving [mailto:xwis...@gmail.com] 
Gesendet: Mittwoch, 24. April 2013 17:40
An: PHP Internals
Betreff: [PHP-DEV] Object Type Casting

Hello,

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();

It would be great if this feature could be added to 5.5 :)

__
Raymond Irving


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

Reply via email to