Annotation of embedaddon/php/ext/reflection/tests/ReflectionClass_hasConstant_basic.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: ReflectionClass::hasConstant()
! 3: --CREDITS--
! 4: Marc Veldman <marc@ibuildings.nl>
! 5: #testfest roosendaal on 2008-05-10
! 6: --FILE--
! 7: <?php
! 8: //New instance of class C - defined below
! 9: $rc = new ReflectionClass("C");
! 10:
! 11: //Check if C has constant foo
! 12: var_dump($rc->hasConstant('foo'));
! 13:
! 14: //C should not have constant bar
! 15: var_dump($rc->hasConstant('bar'));
! 16:
! 17: Class C {
! 18: const foo=1;
! 19: }
! 20: ?>
! 21: --EXPECTF--
! 22: bool(true)
! 23: bool(false)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>