hel" /> hel" /> hel"/>

Zend Studio13.6.1 BUG !! Zend Studio says class does not exist, but it does

136 Views Asked by At

Error picture

I have this code:

<?php
class Test2
{
    public function hello()
    {
        echo "hello";
    }
}

$t=new Test2(); //Class 'Test2' not found
echo $t->hello();`

Zend Studio gives me the error

Class 'Test2' not found

But as you can see, class Test2 does exist.

Here is a screenshot of the situation:

Error picture

Can someone help me solve this problem?
My Zend studio version is 13.61

If I automatically create a new class Test2 according to the error message, I will get another error: this class has been created. Besides, this Test2 is hand-made by me and can't be wrong. In my completely correct project, about 50% of the classes will prompt this error. So I created a new test php file to test the strange problem of recreating. This obvious problem really makes people collapse! I have more than 10 years of php work experience! Thank you very much for your answer.

This program is obviously no problem, it can also run normally in the browser! I think it is the Zend Studio's mistake, and I prefer ZendStudio,so i want to use it's latest version . This issue is only available in the 13.6.1 version. Zend studio 13 does not have this problem. But I want to use the latest version. I just ran it in the browser just now, to make sure that the output hello can be run normally. However, ZendStudio forces it into debug mode and generates a breakpoint on the first line of this file (test.php). I need to continue to execute to get the result: hello. This is another annoying part of ZendStudio. It is also a bug that needs to be solved. In fact, I have more than 18 years of programming experience. ZendStudo has also been used for a few years. This kind of problem happened for the first time. It is estimated to be a bug in zendstudio. But ZendStudio 13.6.1 seems to have been out for a year now? How could there be such a mistake? Can someone help me?

1

There are 1 best solutions below

2
PGOEL On

I will suggest you start Zend Studio in a new Workspace(File | Switch Workspace | Others) and try the code. It shouldn't give any error. Here is the screenshot from my Machine(Zend Studio 13.6.1).

enter image description here