Re: ext/sockets: socket_getpeername/socket_getsockname BC

From: Date: Wed, 29 Jan 2025 10:01:11 +0000
Subject: Re: ext/sockets: socket_getpeername/socket_getsockname BC
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-126229@lists.php.net to get a copy of this message
Am 29.01.2025 um 04:20 schrieb David CARLIER <devnexen@gmail.com>: > Working on this PR #17440, I wanted to ask if the BC from these two calls were ok because : > > Before > function socket_getsockname(Socket $socket, &$address, &$port = null): bool {} > > After > function socket_getsockname(Socket $socket, &$address, ?int &$objint = null): bool {} > > As it is no longer only used for port but also for. interface address index in the case of > AF_PACKET. Personally I would leave it at $port for two reasons: 1) BC break without a big benefit 2) I don't think $objint is a meaningful name While it might not be 100% accurate for AF_PACKET I think the concept of a port is well enough established in the networking word and the more common usage (AF_INET*) makes me think this inconsistency with AF_PACKET is not a real problem. Regards, - Chris

« previous php.internals (#126229) next »