- var_dump: documentation ( source)
<?php
class Test{
const STATUS_ENABLED = 'Enabled';
const STATUS_DISABLED = 'Disabled';
public function someMethod(){
$refl = new ReflectionClass(__CLASS__);
var_dump($refl->getConstants());
}
}
$x = new Test();
$x->someMethod();