Start · Sprachen · PHP · Referenz · is_object

is_object

Funktion

Prüft, ob ein Wert ein Objekt ist.

seit PHP 4.0.0 Kategorie: type

Signatur

is_object(mixed $value): bool

Beschreibung

Für Prüfung auf konkrete Klasse: $v instanceof MyClass.

Parameter

Name Typ Default Beschreibung
$value Pflicht mixed Wert.

Rückgabewert

Typ
bool
Beschreibung
true wenn Objekt.

Beispiele

Basis

<?php

var_dump(is_object(new stdClass)); // true