shmop_open() thoughts?

Hi everyone,

I have come across shared memory in PHP and I could use it in a application I am currently working on to share data across php processes in a web environment.

Has anyone had experience using these functions in a production environment (shmop_open) etc.

Did you find this post useful? Show some love!

Not used shared memory in PHP, however these look to be direct mapping to the underlying libc / SYSV functions, which I know are used in apache httpd if you choose a multi-processing model (look at the scoreboard handling):

IIRC some databases also use shared memory extensively (possibly Postgres)?

I last used shared memory back in '92 on a course...

Thanks, Phil.

I was testing it earlier and it seemed to be quite slow (1.2 seconds) just to get a key back from the ftok function, this was on Windows though...

I think I will just go straight to the DB and store the value in there.

Classic DEV Post from May 29

Who's looking for open source contributors? (May 29 edition)

Please shamelessly promote your project. Everyone who posted in previous weeks is welcome back this week, as always.

Follow @ben to see more of their posts in your feed.
Ben Osborne
Member since Sep 17, 2018
Trending on
I'm a software developer and a meditation teacher - ask me anything!
#ama #productivity #softskills
How To Stay Motivated When Learning to Code?
#discuss #help #programming
PHP Test Coverage with Travis CI and Code Climate using Clover
#php #laravel #codeclimate #travisci
Have you used the new "suggested changes" in GitHub pull requests?
#github #opensource #discuss
Notes on my first PHP job
#php #juniordeveloper #webdev
Designing A Voting System For 1 Billion on the Blockchain (Part 2) - How To Keep A Secret
#blockchain #opensource #architecture #discuss Show us your octocat alter ego
#showdev #discuss
Find someone to mentor
#productivity #career #devto