You include a class, which is either included before, or there is another class with the same name included before.
That happens when you declare a class more than once in a page. You can fix it by either wrapping that class with an if statement(like bellow), or you can put it into it's own file and include_once(), instead of include() if(class_exists('TestClass') != true) { //put class TestClass here }
if(a boolean variable) != true) is known as a pleonasm and it's very poor (and noob) programming. Use if(!class_exists('TestClass'))