1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/reflection/tests/bug29986.phpt
Nikita Popov 3121b7174f Deprecate Reflection export() methods
And remove the Reflector::export() interface method.
2019-07-22 11:39:52 +02:00

42 lines
898 B
PHP

--TEST--
Reflection Bug #29986 (Class constants won't work with predefined constants when using ReflectionClass)
--INI--
precision=14
--FILE--
<?php
class just_constants
{
const BOOLEAN_CONSTANT = true;
const NULL_CONSTANT = null;
const STRING_CONSTANT = 'This is a string';
const INTEGER_CONSTANT = 1000;
const FLOAT_CONSTANT = 3.14159265;
}
echo new ReflectionClass('just_constants');
?>
--EXPECTF--
Class [ <user> class just_constants ] {
@@ %s %d-%d
- Constants [5] {
Constant [ public bool BOOLEAN_CONSTANT ] { 1 }
Constant [ public null NULL_CONSTANT ] { }
Constant [ public string STRING_CONSTANT ] { This is a string }
Constant [ public int INTEGER_CONSTANT ] { 1000 }
Constant [ public float FLOAT_CONSTANT ] { 3.14159265 }
}
- Static properties [0] {
}
- Static methods [0] {
}
- Properties [0] {
}
- Methods [0] {
}
}