typehinting traits

From: Date: Mon, 17 Oct 2011 17:41:45 +0000
Subject: typehinting traits
Groups: php.internals 
Request: Send a blank email to internals+get-55848@lists.php.net to get a copy of this message
Hi Stefan, Multiple people asked me that how they can expect/check that a given object uses a trait or not. Of course one could write the concrete methods as a trait and always use a given interface for typehints, but I can't see why shouldn't instanceof and typehints in general work for traits. Is the any technical or maybe theoretical argument against this? -- Ferenc Kovács @Tyr43l - http://tyrael.hu

« previous php.internals (#55848) next »