Files
php-src/ext/reflection/tests/ReflectionConstant_toString.phpt
Daniel Scherzer 0da9d196b1 Reflection: print boolean constant values as true and false
Updates the output of `ReflectionClassConstant::__toString()` and
`ReflectionConstant::__toString()`, as well as the other ways that class
constants are printed, e.g. `ReflectionClass::__toString()`.
2026-09-22 13:24:10 -07:00

16 lines
273 B
PHP

--TEST--
ReflectionConstant::__toString()
--FILE--
<?php
const IS_TRUE = true;
const IS_FALSE = false;
echo new ReflectionConstant('IS_TRUE');
echo new ReflectionConstant('IS_FALSE');
?>
--EXPECT--
Constant [ bool IS_TRUE ] { true }
Constant [ bool IS_FALSE ] { false }