1. Correct escaping for class names in instanceOf checking and zend_fetch_class
2. some incorrect vars fix