pear/net_socket
PEAR Net_Socket is a lightweight object-oriented PHP socket wrapper for opening TCP/UDP connections, configuring timeouts, reading and writing data, and handling common network errors. A legacy PEAR component useful for simple client sockets and older PHP applications.
Consider it when:
Look elsewhere when:
stream_socket_client or ReactPHP/AMPHP for raw sockets.For executives: This is not a new platform investment or a strategic bet. It is a small, permissively licensed (BSD-2-Clause) transport utility that only matters if we keep legacy PEAR mail or socket code alive. The cost to keep is near zero; the cost of the tail is the concern — it last shipped in 2017, has an unverified upstream, and effectively no community. Recommendation: do not standardize on it. Size a small replacement workstream for every code path that depends on it and fund that as debt retirement, not as new capability.
For engineering: Treat it as a compatibility shim, never a foundation. Its value is a stable blocking socket API and PEAR ecosystem fit; its weaknesses are age, no PSR support, no Composer-native ergonomics, and thin maintenance. If we touch it: pin the exact version, vendor or mirror the source, wrap it behind our own transport interface so the dependency is swappable, enforce explicit connect/read timeouts, and record an ADR naming the migration target (Guzzle / Symfony Mailer / ReactPHP). New code should not import it directly.
One-line ask: Approve continued use behind a wrapper for existing paths only, with a dated migration target and a policy bar on new adopters.
How can I help you explore Laravel packages today?