xref: /PHP-8.2/ext/dba/tests/bug65708.phpt (revision eddab740)
1--TEST--
2Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write)
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7require_once __DIR__ . '/setup/setup_dba_tests.inc';
8check_skip_any();
9?>
10--FILE--
11<?php
12require_once __DIR__ . '/setup/setup_dba_tests.inc';
13$name = 'bug65708.db';
14
15$db = get_any_db($name);
16
17$key = 1;
18$copy = $key;
19
20echo gettype($key)."\n";
21echo gettype($copy)."\n";
22
23dba_exists($key, $db);
24
25echo gettype($key)."\n";
26echo gettype($copy)."\n";
27
28dba_close($db);
29
30?>
31--CLEAN--
32<?php
33require_once __DIR__ . '/setup/setup_dba_tests.inc';
34$db_name = 'bug65708.db';
35cleanup_standard_db($db_name);
36?>
37--EXPECTF--
38Using handler: "%s"
39integer
40integer
41integer
42integer
43