Please how can shared memory be created in PHP using shmop_* (not shm_* if that matters) be locked and unlocked? Does this require libraries?
It seems shmop_read() runs while shmop_write() is still writing because the value read has part of old and new values.
This is the situation, there are three sections. Section One open/create the shared memory segment and write/update it content. Section Two update what is already written into the segment while the Section Three read what is in the segment. Any of these sections can run at any time.