- print_r: documentation ( source)
<?php
class MyClass {
const CONST_VALUE = 'A constant value';
static $a = 'hi';
}
$classname = 'MyClass';
echo $classname::CONST_VALUE; // As of PHP 5.3.0
echo MyClass::CONST_VALUE;
// not mentioned in docs
$new = new MyClass();
print_r($new::CONST_VALUE);
print_r($new::$a);
?>