blob: 778b796dcc67f67cc90127d61d37a1332fd18f12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
--TEST--
ftok() tests
--SKIPIF--
<?php
if (!extension_loaded("sysvshm")){ print 'skip'; }
if (!function_exists('ftok')){ print 'skip'; }
?>
--FILE--
<?php
var_dump(ftok());
var_dump(ftok(1));
var_dump(ftok(1,1,1));
var_dump(ftok("",""));
var_dump(ftok(-1, -1));
var_dump(ftok("qwertyu","qwertyu"));
var_dump(ftok("nonexistentfile","q"));
var_dump(ftok(__FILE__,"q"));
echo "Done\n";
?>
--EXPECTF--
Warning: ftok() expects exactly 2 parameters, 0 given in %s on line %d
NULL
Warning: ftok() expects exactly 2 parameters, 1 given in %s on line %d
NULL
Warning: ftok() expects exactly 2 parameters, 3 given in %s on line %d
NULL
Warning: ftok(): Pathname is invalid in %s on line %d
int(-1)
Warning: ftok(): Project identifier is invalid in %s on line %d
int(-1)
Warning: ftok(): Project identifier is invalid in %s on line %d
int(-1)
Warning: ftok(): ftok() failed - No such file or directory in %s on line %d
int(-1)
int(%d)
Done
|