File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
reflection /
tests /
bug38653.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:01 2012 UTC (13 years, 1 month ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--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
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>