Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_execute.c zend_language_parser.y zend_language_scanner.l
zend_operators.c zend_operators.h

From: Date: Mon, 05 Aug 2002 04:04:33 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_execute.c zend_language_parser.y zend_language_scanner.l
zend_operators.c zend_operators.h
References: 1 2 3 4 5  Groups: php.dev 
Request: Send a blank email to php-dev+get-86521@lists.php.net to get a copy of this message
At 03:35 PM 8/4/2002 -0400, Andrei Zmievski wrote:
On Sat, 03 Aug 2002, Andi Gutmans wrote:
Don't you think we should have a unified way of testing for variable's type/class? I understand that we don't have type unification yet, but having a separate function for each basic type is kind of ugly too.
I'd prefer "is" to be an OOP only construct. i.e. for anything other than an object it'd return false. Just some food for though before we finalize this. This operator will be a reserved word. Are we sure we want "is" to be a reserved word? It might be used quite a bit. I think it's fine to use is as reserved. Other languages (C# for example) uses 'is' for this purpose. By the way, if you don't like casting notation, Alan had an idea to use this one: $a is 'int' $a is 'Foo::Bar' Would that work?
Nope doesn't work for me. I don't see a reason why to start doing all kinds of weird stuff when we have rules for Foo::Bar. Classes shouldn't look different in an "is" statement than in a "catch" statement IMO. Andi

« previous php.dev (#86521) next »