Mantis - Quercus
Viewing Issue Advanced Details
2658 minor always 05-10-08 23:25 05-12-08 10:27
koreth  
nam  
normal  
closed 3.1.7  
fixed  
none    
none 3.2.0  
0002658: Can't use class variable as RHS of instanceof operator
<?php
class Foo {
  static $CLASSNAME = 'Foo';
}

$foo = new Foo();
if ($foo instanceof Foo::$CLASSNAME) {
  echo "yep\n";
}
---

Vanilla PHP prints "yep". Quercus throws an exception:

[show] test.php:7: expected ')' at SCOPE (Foo) in
test.php:6: $foo = new Foo();
test.php:7: if ($foo instanceof Foo::$CLASSNAME) {
test.php:8: echo "yep\n";


Notes
(0003045)
nam   
05-12-08 10:27   
php/03p2