From 6542d482ddab43f81da988f82afb889a38036809 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Mon, 26 Jan 2026 15:26:15 +0000 Subject: [PATCH 1/2] shmop: fix XML to remove useless wrapping para tags via script --- reference/shmop/examples.xml | 21 ++---- reference/shmop/functions/shmop-close.xml | 46 +++++------- reference/shmop/functions/shmop-delete.xml | 38 +++++----- reference/shmop/functions/shmop-open.xml | 24 +++--- reference/shmop/functions/shmop-read.xml | 86 ++++++++++------------ reference/shmop/functions/shmop-size.xml | 38 +++++----- reference/shmop/functions/shmop-write.xml | 82 ++++++++++----------- 7 files changed, 150 insertions(+), 185 deletions(-) diff --git a/reference/shmop/examples.xml b/reference/shmop/examples.xml index 9b5d487d538e..16ea41ea40bb 100644 --- a/reference/shmop/examples.xml +++ b/reference/shmop/examples.xml @@ -1,17 +1,15 @@ - - + &reftitle.examples;
Basic usage - - - Shared Memory Operations Overview - + + Shared Memory Operations Overview + ]]> - - - + +
- - diff --git a/reference/shmop/functions/shmop-close.xml b/reference/shmop/functions/shmop-close.xml index 520b48c44a26..cfd63b22da81 100644 --- a/reference/shmop/functions/shmop-close.xml +++ b/reference/shmop/functions/shmop-close.xml @@ -1,6 +1,6 @@ - + shmop_close Close shared memory block @@ -24,19 +24,17 @@ &reftitle.parameters; - - - - shmop - - - The shared memory block resource created by - shmop_open - - - - - + + + shmop + + + The shared memory block resource created by + shmop_open + + + + &reftitle.returnvalues; @@ -76,29 +74,25 @@ &reftitle.examples; - - - Closing shared memory block - + + Closing shared memory block + ]]> - - - + + This example will close shared memory block identified by $shm_id. &reftitle.seealso; - - - shmop_open - - + + shmop_open + - + shmop_delete Delete shared memory block @@ -17,19 +17,17 @@ &reftitle.parameters; - - - - shmop - - - The shared memory block resource created by - shmop_open - - - - - + + + shmop + + + The shared memory block resource created by + shmop_open + + + + &reftitle.returnvalues; @@ -63,18 +61,16 @@ &reftitle.examples; - - - Deleting shared memory block - + + Deleting shared memory block + ]]> - - - + + This example will delete shared memory block identified by $shm_id. diff --git a/reference/shmop/functions/shmop-open.xml b/reference/shmop/functions/shmop-open.xml index d2765a2b214d..32db2deb001e 100644 --- a/reference/shmop/functions/shmop-open.xml +++ b/reference/shmop/functions/shmop-open.xml @@ -1,6 +1,6 @@ - + shmop_open Create or open shared memory block @@ -150,19 +150,17 @@ &reftitle.examples; - - - Create a new shared memory block - + + Create a new shared memory block + ]]> - - - + + This example opened a shared memory block with a system id returned by ftok. @@ -170,12 +168,10 @@ $shm_id = shmop_open($shm_key, "c", 0644, 100); &reftitle.seealso; - - - shmop_close - shmop_delete - - + + shmop_close + shmop_delete + - + shmop_read Read data from shared memory block @@ -19,39 +19,37 @@ &reftitle.parameters; - - - - shmop - - - The shared memory block identifier created by - shmop_open - - - - - offset - - - Offset from which to start reading; must be greater than or equal to zero - and less than or equal to the actual size of the shared memory segment. - - - - - size - - - The number of bytes to read; must be greater than or equal to zero, - and the sum of offset and size - must be less than or equal to the actual size of the shared memory segment. - 0 reads shmop_size($shmid) - $start bytes. - - - - - + + + shmop + + + The shared memory block identifier created by + shmop_open + + + + + offset + + + Offset from which to start reading; must be greater than or equal to zero + and less than or equal to the actual size of the shared memory segment. + + + + + size + + + The number of bytes to read; must be greater than or equal to zero, + and the sum of offset and size + must be less than or equal to the actual size of the shared memory segment. + 0 reads shmop_size($shmid) - $start bytes. + + + + &reftitle.returnvalues; @@ -101,18 +99,16 @@ &reftitle.examples; - - - Reading shared memory block - + + Reading shared memory block + ]]> - - - + + This example will read 50 bytes from shared memory block and place the data inside $shm_data. @@ -120,11 +116,9 @@ $shm_data = shmop_read($shm_id, 0, 50); &reftitle.seealso; - - - shmop_write - - + + shmop_write + - + shmop_size Get size of shared memory block @@ -18,19 +18,17 @@ &reftitle.parameters; - - - - shmop - - - The shared memory block identifier created by - shmop_open - - - - - + + + shmop + + + The shared memory block identifier created by + shmop_open + + + + &reftitle.returnvalues; @@ -65,18 +63,16 @@ &reftitle.examples; - - - Getting the size of the shared memory block - + + Getting the size of the shared memory block + ]]> - - - + + This example will put the size of shared memory block identified by $shm_id into $shm_size. diff --git a/reference/shmop/functions/shmop-write.xml b/reference/shmop/functions/shmop-write.xml index c7701bcb744d..6f8df10b4457 100644 --- a/reference/shmop/functions/shmop-write.xml +++ b/reference/shmop/functions/shmop-write.xml @@ -1,6 +1,6 @@ - + shmop_write Write data into shared memory block @@ -19,37 +19,35 @@ &reftitle.parameters; - - - - shmop - - - The shared memory block identifier created by - shmop_open - - - - - data - - - A string to write into shared memory block - - - - - offset - - - Specifies where to start writing data inside the shared memory - segment. The offset must be greater than or equal to zero - and less than or equal to the actual size of the shared memory segment. - - - - - + + + shmop + + + The shared memory block identifier created by + shmop_open + + + + + data + + + A string to write into shared memory block + + + + + offset + + + Specifies where to start writing data inside the shared memory + segment. The offset must be greater than or equal to zero + and less than or equal to the actual size of the shared memory segment. + + + + &reftitle.returnvalues; @@ -97,18 +95,16 @@ &reftitle.examples; - - - Writing to shared memory block - + + Writing to shared memory block + ]]> - - - + + This example will write data inside $my_string into shared memory block, $shm_bytes_written will contain @@ -117,11 +113,9 @@ $shm_bytes_written = shmop_write($shm_id, $my_string, 0); &reftitle.seealso; - - - shmop_read - - + + shmop_read + - - + Shared Memory &reftitle.intro; - + Shmop is an easy to use set of functions that allows PHP to read, write, create and delete Unix shared memory segments. - + @@ -21,7 +20,6 @@ &reference.shmop.shmop; - - diff --git a/reference/shmop/configure.xml b/reference/shmop/configure.xml index b964ebf65637..3eb40084b67d 100644 --- a/reference/shmop/configure.xml +++ b/reference/shmop/configure.xml @@ -1,14 +1,13 @@ -
+
&reftitle.install; - + To use shmop you will need to compile PHP with the parameter in your configure line. - +
- - diff --git a/reference/shmop/functions/shmop-close.xml b/reference/shmop/functions/shmop-close.xml index cfd63b22da81..3474659e4782 100644 --- a/reference/shmop/functions/shmop-close.xml +++ b/reference/shmop/functions/shmop-close.xml @@ -18,9 +18,9 @@ Shmopshmop ¬e.resource-migration-8.0-dead-function; - + shmop_close is used to close a shared memory block. - + &reftitle.parameters; @@ -28,19 +28,19 @@ shmop - + The shared memory block resource created by shmop_open - + &reftitle.returnvalues; - + &return.void; - + @@ -84,9 +84,9 @@ shmop_close($shm_id); ]]> - + This example will close shared memory block identified by $shm_id. - + &reftitle.seealso; diff --git a/reference/shmop/functions/shmop-delete.xml b/reference/shmop/functions/shmop-delete.xml index 30aaef163c43..8beee158b204 100644 --- a/reference/shmop/functions/shmop-delete.xml +++ b/reference/shmop/functions/shmop-delete.xml @@ -11,9 +11,9 @@ boolshmop_delete Shmopshmop - + shmop_delete is used to delete a shared memory block. - + &reftitle.parameters; @@ -21,19 +21,19 @@ shmop - + The shared memory block resource created by shmop_open - + &reftitle.returnvalues; - + &return.success; - + @@ -71,10 +71,10 @@ shmop_delete($shm_id); ]]> - + This example will delete shared memory block identified by $shm_id. - + - + The Shmop class Shmop @@ -10,9 +10,9 @@
&reftitle.intro; - + A fully opaque class which replaces shmop resources as of PHP 8.0.0. - +