- var_export: documentation ( source)
<?php
trait MyTrait
{
/**
* Comes from trait
*/
private $foo;
}
class MyClass
{
use MyTrait;
/**
* Comes from class
*/
private $foo;
}
$classFoo = new \ReflectionProperty('MyClass', 'foo');
$traitFoo = new \ReflectionProperty('MyTrait', 'foo');
var_export($traitFoo->getDocComment() == $classFoo->getDocComment());