After reading the manual, I don’t quite understand the connection between stream_socket_xxxx and socket_xxx
For example: stream_socket_recvfrom and socket_recvfrom are functionally the same except for different parameters
Is it understandable that one is an extension of the other?
For example: stream_socket_client and socket_create both seem to be able to create socket resources, and stream is more powerful
My little brother has nothing to show for it. I just want to ask if I don’t understand.
PS: Suddenly I saw another fsocketopen. Why are there so many socket variants?
After reading the manual, I don’t quite understand the connection between stream_socket_xxxx and socket_xxx
For example: stream_socket_recvfrom and socket_recvfrom are functionally the same except for different parameters
Is it understandable that one is an extension of the other?
For example: stream_socket_client and socket_create both seem to be able to create socket resources, and stream is more powerful
My little brother has nothing to show for it. I just want to ask if I don’t understand.
PS: Suddenly I saw another fsocketopen. Why are there so many socket variants?
stream_socket_xxxx is an encapsulation of some functions such as sockets
More protocols are supported
http://php.net/manual/zh/wrappers.php
Almost the same content
Post an answer
http://stackoverflow.com/questions/9760548/php-sockets-vs-streams/9783856#9783856
Anyway, it is recommended to use the stream_* function