RE: [PHP-DEV] Optional interfaces

From: Date: Sat, 16 Nov 2024 09:02:09 +0000
Subject: RE: [PHP-DEV] Optional interfaces
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-125970@lists.php.net to get a copy of this message
Is there some reason you cannot do this: https://3v4l.org/hF1vr Unless I’m missing something, you can’t patch-define a namespaced OptionalInterface that easily. Anyway, I was not implying this is something impossible to accomplish. My point is that it would be beneficial to have syntax for expressing “if your app has this interface, our class implements it”. Juris

« previous php.internals (#125970) next »