mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-07 09:17:29 +00:00
Squashed commit of the following: commit f11ca0e7a57793fa0e3e7f6d451720e6c42bb0b9 Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Dec 8 12:38:42 2015 +0300 Fixed test expectation commit 211f873f542504d0a0f72b6b5cb23908a1c99a2d Author: Dmitry Stogov <dmitry@zend.com> Date: Tue Dec 8 12:28:38 2015 +0300 Embed zend_class_constant.flags into zend_class_constants.value.u2.access_flags commit 51deab84b2cdbf9cdb1a838cf33b2ee45c61748b Author: Dmitry Stogov <dmitry@zend.com> Date: Mon Dec 7 11:18:55 2015 +0300 Fixed issues found by Nikita commit 544dbd5b47e40d38a8ccb96bc5583e9cb7fdd723 Author: Dmitry Stogov <dmitry@zend.com> Date: Sat Dec 5 02:41:05 2015 +0300 Refactored immplementation of https://wiki.php.net/rfc/class_const_visibility @reeze created an RFC here and I emailed internals here and didn't get any responses positive/negative.
42 lines
920 B
PHP
42 lines
920 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;
|
|
}
|
|
|
|
Reflection::export(new ReflectionClass('just_constants'));
|
|
?>
|
|
--EXPECTF--
|
|
Class [ <user> class just_constants ] {
|
|
@@ %s %d-%d
|
|
|
|
- Constants [5] {
|
|
Constant [ public boolean BOOLEAN_CONSTANT ] { 1 }
|
|
Constant [ public null NULL_CONSTANT ] { }
|
|
Constant [ public string STRING_CONSTANT ] { This is a string }
|
|
Constant [ public integer INTEGER_CONSTANT ] { 1000 }
|
|
Constant [ public float FLOAT_CONSTANT ] { 3.14159265 }
|
|
}
|
|
|
|
- Static properties [0] {
|
|
}
|
|
|
|
- Static methods [0] {
|
|
}
|
|
|
|
- Properties [0] {
|
|
}
|
|
|
|
- Methods [0] {
|
|
}
|
|
}
|