class exists in php code example Example 1: php check if class exists if(class_exists('dbinfo')){ Example 2: php check if class exists if(class_exists('dbinfo')){