How to determine if PDO is enabled in PHP?
pdo, php
Solution
Check if the class exists:
if (class_exists('PDO'))
I appreciate the support and all the upvotes I still get, but please check Salman Abbas's answer for the proper way to do this.
Problem
Is there a PHP command I can use to determine if PDO is enabled or disabled? I know I an manually run phpinfo() and eyeball it, but I have a script I run various web servers that display selected PHP configuration settings for the server. So I am looking to see if there is a command I can use.