--TEST-- Bug #38653 (memory leak in ReflectionClass::getConstant()) --FILE-- getConstant("cons")); var_dump($foo->getConstant("cons1")); var_dump($foo->getConstant("cons2")); var_dump($foo->getConstant("no such const")); echo "Done\n"; ?> --EXPECTF-- int(10) string(0) "" string(4) "test" Deprecated: ReflectionClass::getConstant() for a non-existent constant is deprecated, use ReflectionClass::hasConstant() to check if the constant exists in %s on line %d bool(false) Done