hi there,
a quick question regarding whether the following is by design,
because it causes a parse error (the code I tried out did occur within
a class definition ! :-):
if (!$field instanceof CLASS) {
// do something
}
where as this obviously does work:
$class = CLASS;
if (!$field instanceof $class) {
// do something
}
as does this:
if (!$field instanceof self) {
// do something
}
rgds,
jochem
Hello Jochem,
right now it's by design, instanceof takes a T_STRING
or a variable.
CLASS returns a const string which is different form a T_STRING.
marcus
Tuesday, December 27, 2005, 3:30:48 PM, you wrote:
hi there,
a quick question regarding whether the following is by design,
because it causes a parse error (the code I tried out did occur within
a class definition ! :-):
if (!$field instanceof CLASS) {
// do something
}
where as this obviously does work:
$class = CLASS;
if (!$field instanceof $class) {
// do something
}
as does this:
if (!$field instanceof self) {
// do something
}
rgds,
jochem
Best regards,
Marcus