Doc #74261 [Asn->Csd]: ReflectionClassConstant not documented
| From: | cmb@php.net | Date: | Sun, 20 Aug 2017 14:40:57 +0000 |
| Subject: | Doc #74261 [Asn->Csd]: ReflectionClassConstant not documented | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-14900@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74261&edit=1
ID: 74261
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: ReflectionClassConstant not documented
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Reflection related
Operating System: *
PHP Version: 7.1.3
Assigned To: cmb
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2017-08-20 14:40:18] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=342886
Log: Fix bug #74261: ReflectionClassConstant not documented
------------------------------------------------------------------------
[2017-05-21 18:11:44] tomas dot vot at gmail dot com
I have the same problem, method is not documented.
PHP 7.1.2-4+deb.sury.org~yakkety+1 (cli) (built: Mar 2 2017 10:40:28) ( NTS )
Ubutnu 17.04
------------------------------------------------------------------------
[2017-05-13 13:31:36] sam dot ventimiglia at gmail dot com
/**
* @version php 7.1
* @since 13-05-2017
* @see http://php.net/manual/en/reflectionclass.getconstants.php
*/
class ReflClass
{
//different constant visibility's types
const PUBLIC_CONST = 'implicity public';
public const PUBLIC_EXP = 'explicity public';
protected const PROTECTED_CONST = 'protected';
private const PRIVATE_CONST = 'private';
}
// use of it
$oClass = new ReflectionClass('ReflClass');
foreach ($oClass->getConstants() as $const){
var_dump($const);
}
/* this produce */
// string(16) "implicity public"
// string(16) "explicity public"
// string(9) "protected"
// string(7) "private"
------------------------------------------------------------------------
[2017-03-17 12:58:19] cmb@php.net
Thanks, Nikita!
------------------------------------------------------------------------
[2017-03-17 12:43:57] nikic@php.net
We already have ::getReflectionConstant() and ::getReflectionConstants(), which return
ReflectionClassConstant. Switching to doc bug.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74261
--
Edit this bug report at https://bugs.php.net/bug.php?id=74261&edit=1