forked from HvyIndustries/crane-php-stubs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
shmop.php
108 lines (100 loc) · 3.18 KB
/
shmop.php
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
// Start of shmop v.7.0.4-7ubuntu2
/**
* (PHP 4 >= 4.0.4, PHP 5, PHP 7)<br/>
* Create or open shared memory block
* @link http://php.net/manual/en/function.shmop-open.php
* @param int $key <p>
* System's id for the shared memory block.
* Can be passed as a decimal or hex.
* </p>
* @param string $flags <p>
* The flags that you can use:
* "a" for access (sets SHM_RDONLY for shmat)
* use this flag when you need to open an existing shared memory
* segment for read only
* @param int $mode <p>
* The permissions that you wish to assign to your memory segment, those
* are the same as permission for a file. Permissions need to be passed
* in octal form, like for example 0644
* </p>
* @param int $size <p>
* The size of the shared memory block you wish to create in bytes
* </p>
* @return int On success <b>shmop_open</b> will return an id that you can
* use to access the shared memory segment you've created. <b>FALSE</b> is
* returned on failure.
*/
function shmop_open(int $key, string $flags, int $mode, int $size): int {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PHP 7)<br/>
* Read data from shared memory block
* @link http://php.net/manual/en/function.shmop-read.php
* @param int $shmid <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @param int $start <p>
* Offset from which to start reading
* </p>
* @param int $count <p>
* The number of bytes to read
* </p>
* @return string the data or <b>FALSE</b> on failure.
*/
function shmop_read(int $shmid, int $start, int $count): string {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PHP 7)<br/>
* Close shared memory block
* @link http://php.net/manual/en/function.shmop-close.php
* @param int $shmid <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @return void No value is returned.
*/
function shmop_close(int $shmid) {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PHP 7)<br/>
* Get size of shared memory block
* @link http://php.net/manual/en/function.shmop-size.php
* @param int $shmid <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @return int an int, which represents the number of bytes the shared memory
* block occupies.
*/
function shmop_size(int $shmid): int {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PHP 7)<br/>
* Write data into shared memory block
* @link http://php.net/manual/en/function.shmop-write.php
* @param int $shmid <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @param string $data <p>
* A string to write into shared memory block
* </p>
* @param int $offset <p>
* Specifies where to start writing data inside the shared memory
* segment.
* </p>
* @return int The size of the written <i>data</i>, or <b>FALSE</b> on
* failure.
*/
function shmop_write(int $shmid, string $data, int $offset): int {}
/**
* (PHP 4 >= 4.0.4, PHP 5, PHP 7)<br/>
* Delete shared memory block
* @link http://php.net/manual/en/function.shmop-delete.php
* @param int $shmid <p>
* The shared memory block identifier created by
* <b>shmop_open</b>
* </p>
* @return bool <b>TRUE</b> on success or <b>FALSE</b> on failure.
*/
function shmop_delete(int $shmid): bool {}
// End of shmop v.7.0.4-7ubuntu2
?>