method_existsSprawdza czy istnieje metoda klasy
&reftitle.description;
boolmethod_existsobjectstringobject_or_classstringmethod
Sprawdza czy metoda klasy istnieje w ramach klasy lub obiektu podanych jako
object_or_class.
&reftitle.parameters;
object_or_class
Instancja obiektu lub nazwa klasy
method
Nazwa metody
&reftitle.returnvalues;
Zwraca &true; jeżeli metoda podana jako method
została zdefiniowana dla podanego object_or_class, &false;
w przeciwnym wypadku.
&reftitle.changelog;
&Version;&Description;7.4.0
Sprawdzenia klasy dla odziedziczonych metod prywatnych zwracają teraz false.
&reftitle.examples;
Przykład użycia method_exists
]]>
&example.outputs;
Przykład statycznego użycia method_exists
]]>
&example.outputs;
&reftitle.notes;
¬e.uses-autoload;
Funkcja method_exists nie wykrywa metod,
które są dostępne magicznie przy użyciu metody
__call.
&reftitle.seealso;
function_existsis_callableclass_exists