diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-08-30 10:42:49 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-08-30 10:42:49 +0000 |
| commit | 86bf55a3d898eda6c0d165eb019b17618e9f1442 (patch) | |
| tree | c694d5d1404f8e2f4f73b79ea48dcc5bd1b93f25 /ext/reflection/tests | |
| parent | d6ec9d21ec8f1864b9f92bf0d866011ebf71ad20 (diff) | |
| download | php-git-86bf55a3d898eda6c0d165eb019b17618e9f1442.tar.gz | |
MFH: fix #38653 (memory leak in ReflectionClass::getConstant())
Diffstat (limited to 'ext/reflection/tests')
| -rw-r--r-- | ext/reflection/tests/bug38653.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/reflection/tests/bug38653.phpt b/ext/reflection/tests/bug38653.phpt new file mode 100644 index 0000000000..68781d2aba --- /dev/null +++ b/ext/reflection/tests/bug38653.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #38653 (memory leak in ReflectionClass::getConstant()) +--FILE-- +<?php + +class foo { + const cons = 10; + const cons1 = ""; + const cons2 = "test"; +} + +class bar extends foo { +} + +$foo = new ReflectionClass("foo"); +var_dump($foo->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" +bool(false) +Done |
