Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- ReflectionEnumUnitCase::getDocComment() --FILE-- <?php // enum cases should suppo..
Decoded Output download
--TEST--
ReflectionEnumUnitCase::getDocComment()
--FILE--
<?php
// enum cases should support doc comments, like class constants.
enum Foo {
/** Example doc comment */
case Bar;
case Baz;
}
var_dump((new ReflectionEnumUnitCase(Foo::class, 'Bar'))->getDocComment());
var_dump((new ReflectionEnumUnitCase(Foo::class, 'Baz'))->getDocComment());
var_dump((new ReflectionClassConstant(Foo::class, 'Bar'))->getDocComment());
var_dump((new ReflectionClassConstant(Foo::class, 'Baz'))->getDocComment());
?>
--EXPECT--
string(26) "/** Example doc comment */"
bool(false)
string(26) "/** Example doc comment */"
bool(false)
Did this file decode correctly?
Original Code
--TEST--
ReflectionEnumUnitCase::getDocComment()
--FILE--
<?php
// enum cases should support doc comments, like class constants.
enum Foo {
/** Example doc comment */
case Bar;
case Baz;
}
var_dump((new ReflectionEnumUnitCase(Foo::class, 'Bar'))->getDocComment());
var_dump((new ReflectionEnumUnitCase(Foo::class, 'Baz'))->getDocComment());
var_dump((new ReflectionClassConstant(Foo::class, 'Bar'))->getDocComment());
var_dump((new ReflectionClassConstant(Foo::class, 'Baz'))->getDocComment());
?>
--EXPECT--
string(26) "/** Example doc comment */"
bool(false)
string(26) "/** Example doc comment */"
bool(false)
Function Calls
None |
Stats
MD5 | fad0d233bf3d15d7c5394e3411325047 |
Eval Count | 0 |
Decode Time | 81 ms |