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