Annotation of embedaddon/php/ext/pdo_sqlite/tests/bug44327_3.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #44327.3 (PDORow::queryString property & numeric offsets / Crash)
                      3: --SKIPIF--
                      4: <?php
                      5: if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: 
                     10: $db = new pdo('sqlite::memory:');
                     11: 
                     12: $x = $db->query('select 1 as queryStringxx');
                     13: $y = $x->fetch(PDO::FETCH_LAZY);
                     14: var_dump($y, $y->queryString, $y->queryStringzz, $y->queryStringxx);
                     15: 
                     16: print "---\n";
                     17: 
                     18: var_dump($y[5], $y->{3});
                     19: 
                     20: ?>
                     21: --EXPECTF--
                     22: object(PDORow)#%d (2) {
                     23:   ["queryString"]=>
                     24:   string(25) "select 1 as queryStringxx"
                     25:   ["queryStringxx"]=>
                     26:   string(1) "1"
                     27: }
                     28: string(25) "select 1 as queryStringxx"
                     29: NULL
                     30: string(1) "1"
                     31: ---
                     32: NULL
                     33: NULL

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>