On 10/04/02, "Lauri Liinat" <[EMAIL PROTECTED]> wrote: > so, Wez - why would you want to introduce yet another > cast operator - the "as" keyword? while PHP already has > adopted the C-style (new_type)... operator?
Since we don't have a real type system, (type) casting doesn't actually do what you were thinking. (Look for ZEND_CAST in zend_execute.c). My thought for having a different operator from (cast) was that it avoids possible ambiguities when we have an object class and try (object)$obj. All this would do is return $obj as-is, since it is already a PHP object, and not return a "class object" representation of it. Likewise for the other basic type names. --Wez. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php