On further consideration this is probably better addressed by setting the
relevant socket streams to non-blocking so that a client connection can be
created in the same process space and tested utilizing select() and an
event loop. This would obviate the need for a proc_open()
altogether.
Thanks for rubber-ducking, internals.
On further consideration this is probably better addressed by setting the
relevant socket streams to non-blocking so that a client connection can be
created in the same process space and tested utilizing select() and an
event loop. This would obviate the need for aproc_open()
altogether.
^^ this. This is how most of the tests in the sockets extension work when
they need to test a remote connection.
Example:
https://github.com/php/php-src/blob/master/ext/sockets/tests/socket_sentto_r
ecvfrom_ipv4_udp.phpt