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