PHP ReflectionClass isTrait () function

PHP

Syntax:
bool ReflectionClass::isTrait()
Parameters:this the function takes no parameters.Return value:this function returns TRUE if the trait is available, FALSE otherwise.The following programs illustrate the ReflectionClass function::isTrait()in PHP:
Program 1:  
// Trait class definition trait Company { public function GeeksforGeeks() { } }  
// Using ReflectionClass over
// certain trait $obj = new ReflectionClass ( 'Company' );  
// Call the isTrait() function $A = $obj -> isTrait();  
// Get true or false var_dump ( $A ); ?>
Output:
bool (true)
Program 2:  
// Define a custom Department class class Department { }  
// Using ReflectionClass over
// custom department class $obj = new ReflectionClass ( 'Department' );  
// Call the isTrait() function $Result = $obj -> isTrait();  
// Get true or false var_dump ( $Result ); ?>
Output:
bool (false)
Link: https://www.php.net/manual/en/reflectionclass.istrait.php