note 107065 added to language.oop5.traits
| From: | Antkhan at osu1 dot php dot net | Date: | Wed, 04 Jan 2012 16:56:42 +0000 |
| Subject: | note 107065 added to language.oop5.traits | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-185358@lists.php.net to get a copy of this message | ||
bool is_a ( object $object , string $class_name )
(En) : This function will not detect if an object match a trait
(Fr) : Cette fonction ne dira pas si un objet utilise un trait
trait myType
{
}
class myExample
{
use myType;
}
$test=new myExample();
var_dump($test,'myType'); // false
(En) : So, how to test if an object match a trait ?
(Fr) : Donc, comment savoir si un objet utilise un trait ?
Tested with PHP 5.4.0 RC4
----
Server IP: 69.147.83.197
Probable Submitter: 85.158.112.96
----
Manual Page -- http://www.php.net/manual/en/language.oop5.traits.php
Edit -- https://master.php.net/note/edit/107065
Del: integrated -- https://master.php.net/note/delete/107065/integrated
Del: useless -- https://master.php.net/note/delete/107065/useless
Del: bad code -- https://master.php.net/note/delete/107065/bad+code
Del: spam -- https://master.php.net/note/delete/107065/spam
Del: non-english -- https://master.php.net/note/delete/107065/non-english
Del: in docs -- https://master.php.net/note/delete/107065/in+docs
Del: other reasons-- https://master.php.net/note/delete/107065
Reject -- https://master.php.net/note/reject/107065
Search -- https://master.php.net/manage/user-notes.php