The ReflectionMethod class

(PHP 5, PHP 7, PHP 8)

Einführung

The ReflectionMethod class reports information about a method.

Klassenbeschreibung

class ReflectionMethod extends ReflectionFunctionAbstract {
/* Konstanten */
const int IS_STATIC = 16;
const int IS_PUBLIC = 1;
const int IS_PROTECTED = 2;
const int IS_PRIVATE = 4;
const int IS_ABSTRACT = 64;
const int IS_FINAL = 32;
/* Eigenschaften */
public string $class;
/* Geerbte Eigenschaften */
public string $name;
/* Methoden */
public __construct(object|string $objectOrMethod, string $method)
public __construct(string $classMethod)
public static export(string $class, string $name, bool $return = false): string
public getClosure(?object $object = null): Closure
public getModifiers(): int
public invoke(?object $object, mixed ...$args): mixed
public invokeArgs(?object $object, array $args): mixed
public isAbstract(): bool
public isConstructor(): bool
public isDestructor(): bool
public isFinal(): bool
public isPrivate(): bool
public isProtected(): bool
public isPublic(): bool
public isStatic(): bool
public setAccessible(bool $accessible): void
public __toString(): string
/* Geerbte Methoden */
public ReflectionFunctionAbstract::getAttributes(?string $name = null, int $flags = 0): array
}

Eigenschaften

name

Method name

class

Class name

Vordefinierte Konstanten

ReflectionMethod Modifiers

ReflectionMethod::IS_STATIC

Indicates that the method is static. Prior to PHP 7.4.0, the value was 1.

ReflectionMethod::IS_PUBLIC

Indicates that the method is public. Prior to PHP 7.4.0, the value was 256.

ReflectionMethod::IS_PROTECTED

Indicates that the method is protected. Prior to PHP 7.4.0, the value was 512.

ReflectionMethod::IS_PRIVATE

Indicates that the method is private. Prior to PHP 7.4.0, the value was 1024.

ReflectionMethod::IS_ABSTRACT

Indicates that the method is abstract. Prior to PHP 7.4.0, the value was 2.

ReflectionMethod::IS_FINAL

Indicates that the method is final. Prior to PHP 7.4.0, the value was 4.

Hinweis:

The values of these constants may change between PHP versions. It is recommended to always use the constants and not rely on the values directly.

Inhaltsverzeichnis

Hier Kannst Du einen Kommentar verfassen


Bitte gib mindestens 10 Zeichen ein.
Wird geladen... Bitte warte.
* Pflichtangabe
Es sind noch keine Kommentare vorhanden.

Neuigkeiten für PHP-Entwickler: Laravel 11 Veröffentlichung

Am 12. März 2024 wurde die lang erwartete Version 11 des Laravel-Frameworks veröffentlicht, die eine Reihe von spannenden Neuerungen und Verbesserungen für die PHP-Entwicklungsgemeinschaft mit sich bringt. ...

Mike94

Autor : Mike94
Kategorie: PHP Magazin

Technisches SEO bleibt relevant

Technisches SEO – Was ist das überhaupt? Technisches SEO bezieht sich auf die Optimierung der technischen Aspekte deiner Webseite. Das Ziel ist klar! ...

admin

Autor : admin
Kategorie: SEO & Online-Marketing

Was ist neu in der PHP 8.2.10

PHP 8.2.10 ist eine der neuesten Versionen von PHP, die eine Reihe von Verbesserungen und neuen Funktionen mit sich bringt. In diesem Artikel werden wir einige der herausragenden Neuerungen und Verbesserungen dieser Version diskutieren. ...

admin

Autor : admin
Kategorie: Software-Updates

Tutorial veröffentlichen

Tutorial veröffentlichen

Teile Dein Wissen mit anderen Entwicklern weltweit

Du bist Profi in deinem Bereich und möchtest dein Wissen teilen, dann melde dich jetzt an und teile es mit unserer PHP-Community

mehr erfahren

Tutorial veröffentlichen

Seltsames Verhalten von execute() oder Fehler meinerseits

Hallo liebe Community, ich habe ein kleines Problem und vielleicht kann mir ja jemand helfen, würde ich mich sehr drüber freuen. Unten steht e ...

Geschrieben von garibaldiwz am 22.03.2024 13:03:12
Forum: SQL / Datenbanken
Google reCAPTCHA in Kontaktformular einbinden

Überprüfen Sie den E-Mail-Versand: Stellen Sie sicher, dass die E-Mail-Funktion mail() ordnungsgemäß funktioniert und dass keine Fehler beim V ...

Geschrieben von Gast am 18.03.2024 04:54:16
Forum: PHP Developer Forum
`count.php`

Hallo cober93327, und Danke fuer deine Antwort! :-) Naja, so einen "Besucherzähler" auf der Webseite anzuzeigen ist schon eher etwas, das man a ...

Geschrieben von kekse1 am 17.03.2024 15:56:38
Forum: Projekthilfe
`count.php`

Es gibt dazu natuerlich auch eine recht ausfuehrliche Dokumentation in meinem GitHub-Repository Es würde meiner Ansicht nach enorm helfen, wenn D ...

Geschrieben von cober93327 am 14.03.2024 15:49:28
Forum: Projekthilfe