Hi,
I can't instantiate the class, as there is no way to guarantee that the
constructor doesn't require arguments, and I don't want to halt program
execution if it doesn't implement tester
Greg
Marek Kilimajer wrote:
Maybe
if (new MyClass instanceof_equiv tester) {
...
}
?>
--
PHP
Maybe
if (new MyClass instanceof_equiv tester) {
...
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
Is it possible to determine whether a class implements an interface
without instantiating an object of that class?
class MyClass implements tester {
function doesStuff(){}
}
$var = 'MyClass';
if ($var instanceof_equiv tester) {
...
}
?>
I really need this kind of capability to dete
3 matches
Mail list logo