Voting

: min(two, zero)?
(Example: nine)

The Note You're Voting On

me [at] klay [dot] me
11 years ago
Example of usage:

public static function getClassData($class)
{
// Trying to create a new object of ReflectionClass class
$class = new ReflectionClass($class);

$details = sprintf('%s - %s%s%s%s%s%s%s%s',
$class->getName(),
$class->isInternal() ? 'internal class,' : 'user-defined class,',
$class->isTrait() ? ' is trait,' : '',
$class->isInterface() ? ' is interface,' : '',
$class->isAbstract() ? ' is abstract,' : '',
$class->isFinal() ? ' is final,' : '',
$class->isCloneable() ? ' is cloneable,' : '',
$class->isInstantiable() ? ' is instantiable,' : '',
$class->isIterateable() ? ' is iterable : ''
);

return '<pre class="debug">' . rtrim($details, ',') . '</pre>';
}

<< Back to user notes page

To Top