/hphp/test/zend/bad/ext-pdo_mysql/pdo_mysql_phpinfo.php
https://bitbucket.org/gnanakeethan/hiphop-php · PHP · 19 lines · 14 code · 4 blank · 1 comment · 1 complexity · e02446011416326dc19f87d8e306194c MD5 · raw file
- <?php
- require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
- $db = MySQLPDOTest::factory();
- ob_start();
- phpinfo();
- $tmp = ob_get_contents();
- ob_end_clean();
- /* PDO Driver for MySQL, client library version => 6.0.3-alpha */
- $expected = sprintf('Client API version => %s',
- $db->getAttribute(PDO::ATTR_CLIENT_VERSION));
- if (false === stristr($tmp, $expected)) {
- printf("[001] Cannot find MySQL PDO driver line in phpinfo() output\n");
- }
- print "done!";
- ?>