Files
php-src/ext/reflection/tests/ReflectionClass_toString_006.phpt
2023-04-16 22:20:26 +02:00

33 lines
406 B
PHP

--TEST--
Using ReflectionClass::__toString() with typed class constants
--FILE--
<?php
class Foo {
const ?int CONST1 = 1;
}
echo new ReflectionClass(Foo::class);
?>
--EXPECTF--
Class [ <user> class Foo ] {
@@ %s 3-5
- Constants [1] {
Constant [ public ?int CONST1 ] { 1 }
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [0] {
}
}