summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/tests/bug44327_3.phpt
blob: 462fbab6dcc3f4266b149ab693b686b16d5a09bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--TEST--
Bug #44327.3 (PDORow::queryString property & numeric offsets / Crash)
--SKIPIF--
<?php
if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
?>
--FILE--
<?php

$db = new PDO('sqlite::memory:');

$x = $db->query('select 1 as queryStringxx');
$y = $x->fetch(PDO::FETCH_LAZY);
var_dump($y, $y->queryString, $y->queryStringzz, $y->queryStringxx);

print "---\n";

var_dump($y[5], $y->{3});

?>
--EXPECTF--
object(PDORow)#%d (2) {
  ["queryString"]=>
  string(25) "select 1 as queryStringxx"
  ["queryStringxx"]=>
  int(1)
}
string(25) "select 1 as queryStringxx"
NULL
int(1)
---
NULL
NULL