Voting

: min(one, nine)?
(Example: nine)

The Note You're Voting On

davide dot renzi at gmail dot com
11 years ago
If you want to return the constants defined inside a class then you can also define an internal method as follows:

<?php
class myClass {
const
NONE = 0;
const
REQUEST = 100;
const
AUTH = 101;

// others...

static function getConstants() {
$oClass = new ReflectionClass(__CLASS__);
return
$oClass->getConstants();
}
}
?>

<< Back to user notes page

To Top