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 Common: PDORow + get_parent_class() --SKIPIF-- <?php # vim:ft=php if (!extens..

Decoded Output download

--TEST--
PDO Common: PDORow + get_parent_class()
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded('pdo')) die('skip no PDO');
if (!extension_loaded('pdo_4d')) die('skip no PDO for 4D extension');

die('skip : this is a SQLite Test');


if (!extension_loaded('pdo_sqlite')) die ("skip Need PDO_SQlite support");

require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';

PDOTest::skip();
?>
--FILE--
<?php
$db = new PDO('sqlite::memory:');
$db->exec('CREATE TABLE test (id int)');
$db->exec('INSERT INTO test VALUES (23)');

$stmt = $db->prepare('SELECT id FROM test');
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_LAZY);

echo get_class($result), "
";
var_dump(get_parent_class($result));
?>
--EXPECT--
PDORow
string(6) "PDORow"

Did this file decode correctly?

Original Code

--TEST--
PDO Common: PDORow + get_parent_class()
--SKIPIF--
<?php # vim:ft=php
if (!extension_loaded('pdo')) die('skip no PDO');
if (!extension_loaded('pdo_4d')) die('skip no PDO for 4D extension');

die('skip : this is a SQLite Test');


if (!extension_loaded('pdo_sqlite')) die ("skip Need PDO_SQlite support");

require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';

PDOTest::skip();
?>
--FILE--
<?php
$db = new PDO('sqlite::memory:');
$db->exec('CREATE TABLE test (id int)');
$db->exec('INSERT INTO test VALUES (23)');

$stmt = $db->prepare('SELECT id FROM test');
$stmt->execute();
$result = $stmt->fetch(PDO::FETCH_LAZY);

echo get_class($result), "\n";
var_dump(get_parent_class($result));
?>
--EXPECT--
PDORow
string(6) "PDORow"

Function Calls

dirname 1
extension_loaded 3

Variables

None

Stats

MD5 111de8b1a23898e1956dd5f56678536f
Eval Count 0
Decode Time 116 ms