original_string: function constants($class,$prefix='') {
  		$ref=new ReflectionClass($class);
  		$out=array();
  		foreach (preg_grep('/^'.$prefix.'/',array_keys($ref->getconstants()))
  			as $val) {
  			$out[$key=substr($val,strlen($prefix))]=
  				constant((is_object($class)?get_class($class):$class).'::'.$prefix.$key);
  		}
  		unset($ref);
  		return $out;
  	}
code: function constants($class,$prefix='') {
  		$ref=new ReflectionClass($class);
  		$out=array();
  		foreach (preg_grep('/^'.$prefix.'/',array_keys($ref->getconstants()))
  			as $val) {
  			$out[$key=substr($val,strlen($prefix))]=
  				constant((is_object($class)?get_class($class):$class).'::'.$prefix.$key);
  		}
  		unset($ref);
  		return $out;
  	}
code_tokens: function constants ( $ class , $ prefix = '' ) { $ ref = new ReflectionClass ( $ class ) ; $ out = array ( ) ; foreach ( preg_grep ( '/^' . $ prefix . '/' , array_keys ( $ ref -> getconstants ( ) ) ) as $ val ) { $ out [ $ key = substr ( $ val , strlen ( $ prefix ) ) ] = constant ( ( is_object ( $ class ) ? get_class ( $ class ) : $ class ) . '::' . $ prefix . $ key ) ; } unset ( $ ref ) ; return $ out ; }
docstring: Convert class constants to array
  @return array
  @param $class object|string
  @param $prefix string
docstring_tokens: Convert class constants to array