Proposal for RFC: get_class_constants()

From: Date: Sat, 14 Dec 2013 00:28:50 +0000
Subject: Proposal for RFC: get_class_constants()
Groups: php.internals 
Request: Send a blank email to internals+get-70630@lists.php.net to get a copy of this message
Hi,

following the howto for RFCs and since this would be my first one, I'd
like to ask for your thoughts if such an RFC might find approval. If
yes, I'll be happy to work on it.

Proposal: Create a function get_class_constants()

It would be similar to get_class_methods() and get_class_vars().

Currently the same behavious is only possible by the help of reflection,
which due to the nature of reflection takes a bit more work/cpu-cycles.

  $reflection = new \ReflectionClass($class);
  $constants = $reflection->getConstants();


Kind regards,
 Stefan


Thread (14 messages)

« previous php.internals (#70630) next »