downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ReflectionClass::hasMethod> <ReflectionClass::getStaticPropertyValue
Last updated: Fri, 13 Nov 2009

view this page in

ReflectionClass::hasConstant

(PHP 5 >= 5.1.0)

ReflectionClass::hasConstantSabit tanımlı mı diye bakar

Açıklama

public bool ReflectionClass::hasConstant ( string $isim )

Belirtilen sabit tanımlıysa TRUE döner.

Değiştirgeler

isim

Bakılacak sabitin ismi.

Dönen Değerler

Sabit tanımlıysa TRUE değilse FALSE.

Örnekler

Örnek 1 - ReflectionClass::hasConstant örneği

<?php
class Foo {
    const 
c1 1;
}

$class = new ReflectionClass("Foo");

var_dump($class->hasConstant("c1"));
var_dump($class->hasConstant("c2"));
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

bool(true)
bool(false)

Ayrıca Bakınız



add a note add a note User Contributed Notes
ReflectionClass::hasConstant
There are no user contributed notes for this page.

 
show source | credits | sitemap | contact | advertising | mirror sites