Thread safe arrays in PHP? | Sololearn: Learn to code for FREE!

0

Thread safe arrays in PHP?

Hi guys, I want to implement websockets communication between PHP and Javascript. I'm executing a PHP script on the console and then. I need to output some values that this script generates. But the problem is that if any client is connected I can't send anything. By this reason, I need to wait until a client is connected on another thread. When a new client connects I store it on an array that I will access to send those messages. But I don't know how to do it? Any clue? Thanks so much!!

1/30/2020 12:49:49 PM

Álvaro Rodríguez García

7 Answers

New Answer

+1

So you need to know how to access the array?

+1

yes :3

+1

tell me George Ryan :3

+1

George Ryan tell me niw pls :3

+1

George Ryan George Ryan

+1

+_+ George Ryan why no tell me, why u lie, why do tat. why... no.....

+1

me am cry.