xref: /PHP-7.1/ext/pdo_mysql/tests/bug70389.phpt (revision ef1bd8f0)
1--TEST--
2Bug #70389 (PDO constructor changes unrelated variables)
3--SKIPIF--
4<?php
5require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
6require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
7MySQLPDOTest::skip();
8?>
9--FILE--
10<?php
11require(dirname(__FILE__). DIRECTORY_SEPARATOR . 'config.inc');
12$flags = [
13	PDO::MYSQL_ATTR_FOUND_ROWS	=> true,
14	PDO::MYSQL_ATTR_LOCAL_INFILE	=> true,
15	PDO::ATTR_PERSISTENT 		=> true,
16];
17
18$std = new StdClass();
19$std->flags = $flags;
20
21new PDO(PDO_MYSQL_TEST_DSN, PDO_MYSQL_TEST_USER, PDO_MYSQL_TEST_PASS, $flags);
22var_dump($flags);
23
24?>
25--EXPECTF--
26array(3) {
27  [1005]=>
28  bool(true)
29  [1001]=>
30  bool(true)
31  [12]=>
32  bool(true)
33}
34