Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- PDO::ATTR_CONNECTION_STATUS --EXTENSIONS-- pdo_mysql --SKIPIF-- <?php require_onc..
Decoded Output download
--TEST--
PDO::ATTR_CONNECTION_STATUS
--EXTENSIONS--
pdo_mysql
--SKIPIF--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
?>
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
$db = MySQLPDOTest::factory();
$status = $db->getAttribute(PDO::ATTR_CONNECTION_STATUS);
if (!is_string($status))
printf("[002] Expecting string, got '%s'
", var_export($status, true));
if ('' == $status)
printf("[003] Connection status string must not be empty
");
if (false !== $db->setAttribute(PDO::ATTR_CONNECTION_STATUS, 'my own connection status'))
printf("[004] Changing read only attribute
");
$status2 = $db->getAttribute(PDO::ATTR_CONNECTION_STATUS);
if ($status !== $status2)
printf("[005] Connection status should not have changed
");
print "done!";
?>
--EXPECT--
done!
Did this file decode correctly?
Original Code
--TEST--
PDO::ATTR_CONNECTION_STATUS
--EXTENSIONS--
pdo_mysql
--SKIPIF--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
$db = MySQLPDOTest::factory();
?>
--FILE--
<?php
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
$db = MySQLPDOTest::factory();
$status = $db->getAttribute(PDO::ATTR_CONNECTION_STATUS);
if (!is_string($status))
printf("[002] Expecting string, got '%s'\n", var_export($status, true));
if ('' == $status)
printf("[003] Connection status string must not be empty\n");
if (false !== $db->setAttribute(PDO::ATTR_CONNECTION_STATUS, 'my own connection status'))
printf("[004] Changing read only attribute\n");
$status2 = $db->getAttribute(PDO::ATTR_CONNECTION_STATUS);
if ($status !== $status2)
printf("[005] Connection status should not have changed\n");
print "done!";
?>
--EXPECT--
done!
Function Calls
None |
Stats
MD5 | e7c2bf0862f5a01aa09d20501c9edba8 |
Eval Count | 0 |
Decode Time | 84 ms |