1--TEST-- 2PDO PgSQL Bug #14244 (Postgres sees parameters in a dollar-delimited string) 3--EXTENSIONS-- 4pdo_pgsql 5--SKIPIF-- 6<?php 7require __DIR__ . '/config.inc'; 8require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 9PDOTest::skip(); 10?> 11--FILE-- 12<?php 13echo "Test\n"; 14 15require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 16$pdo = PDOTest::test_factory(__DIR__ . '/common.phpt'); 17$pdo->setAttribute (\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); 18$pdo->setAttribute (\PDO::ATTR_DEFAULT_FETCH_MODE, \PDO::FETCH_ASSOC); 19 20echo "Already working (see bug64953.phpt):\n"; 21 22$st = $pdo->prepare("SELECT '?' question"); 23$st->execute(); 24var_dump($st->fetch()); 25 26echo "Inside a dollar-quoted string:\n"; 27 28$st = $pdo->prepare("SELECT \$\$?\$\$ question"); 29$st->execute(); 30var_dump($st->fetch()); 31 32?> 33Done 34--EXPECT-- 35Test 36Already working (see bug64953.phpt): 37array(1) { 38 ["question"]=> 39 string(1) "?" 40} 41Inside a dollar-quoted string: 42array(1) { 43 ["question"]=> 44 string(1) "?" 45} 46Done 47