Dutch PHP Conference 2026 - Call For Papers

The ReflectionObject class

(PHP 5, PHP 7, PHP 8)

Introduction

The ReflectionObject class reports information about an object .

Class synopsis

class ReflectionObject extends ReflectionClass {
/* Inherited constants */
/* Inherited properties */
public string $name ;
/* Methods */
public __construct (object $object)
/* Inherited methods */
public static ReflectionClass::export (mixed $argument, bool $return = false ): string
public ReflectionClass::getAttributes (? string $name = null , int $flags = 0): array
public ReflectionClass::getStaticPropertyValue (string $name, mixed &$def_value = ?): mixed
public ReflectionClass::newLazyGhost (callable $initializer, int $options = 0): object
public ReflectionClass::newLazyProxy (callable $factory, int $options = 0): object
public ReflectionClass::resetAsLazyGhost (object $object, callable $initializer, int $options = 0): void
public ReflectionClass::resetAsLazyProxy (object $object, callable $factory, int $options = 0): void
}

Changelog

Version Description
8.0.0 ReflectionObject::export() was removed.

Table of Contents

Found A Problem?

Learn How To Improve This PageSubmit a Pull RequestReport a Bug
+add a note

User Contributed Notes 1 note

up
5
marcel dot nolte at noltecomputer dot de
16 years ago
To simply enlist all methods and properties of an object simply write:

<?php ReflectionObject::export($yourObject); ?>

,which will cause an var_export-like output.
+add a note

AltStyle によって変換されたページ (->オリジナル) /