<?php $pdo = new PDO('mysql:host=127.0.0.1;port=3306;dbname=mobile;','root','',array( PDO::ATTR_PERSISTENT => true, )); $attributes = array( "AUTOCOMMIT", "ERRMODE", "CASE", "CLIENT_VERSION", "CONNECTION_STATUS", "ORACLE_NULLS", "PERSISTENT", "PREFETCH", "SERVER_INFO", "SERVER_VERSION", "TIMEOUT" ); foreach ($attributes as $val) { echo "PDO::ATTR_$val: "; var_dump($pdo->getAttribute(constant("PDO::ATTR_$val"))); echo "/n<br/>"; } ?>