xref: /PHP-8.1/ext/dba/tests/bug65708.phpt (revision b5a14e6c)
1--TEST--
2Bug #65708 (dba functions cast $key param to string in-place, bypassing copy on write)
3--EXTENSIONS--
4dba
5--SKIPIF--
6<?php
7    require_once(__DIR__ .'/skipif.inc');
8?>
9--FILE--
10<?php
11
12error_reporting(E_ALL);
13
14require_once(__DIR__ .'/test.inc');
15
16$db = dba_popen($db_filename, 'c');
17
18$key = 1;
19$copy = $key;
20
21echo gettype($key)."\n";
22echo gettype($copy)."\n";
23
24dba_exists($key, $db);
25
26echo gettype($key)."\n";
27echo gettype($copy)."\n";
28
29dba_close($db);
30
31?>
32--CLEAN--
33<?php
34    require(__DIR__ .'/clean.inc');
35?>
36--EXPECT--
37integer
38integer
39integer
40integer
41