PHP get_declared_interfaces() function

In this chapter you will learn:

  1. What is PHP get_declared_interfaces() function
  2. Syntax for PHP get_declared_interfaces() function
  3. Return Values
  4. Example - Get all declared interfaces

Description

Returns an array of all declared interfaces.

Syntax

PHP get_declared_interfaces() function has the following syntax.

array get_declared_interfaces ( void )

Return Values

Returns an array of the names of the declared interfaces in the current script.

Example

Get all declared interfaces


<?php
print_r(get_declared_interfaces());
?>

The code above generates the following result.

Next chapter...

What you will learn in the next chapter:

  1. What is PHP get_defined_functions() function
  2. Syntax for PHP get_defined_functions() function
  3. Return Values
  4. Example - Get all functions
Home » PHP Tutorial » PHP Class Functions
PHP class_exists() function
PHP get_class() function
PHP get_declared_classes() function
PHP get_declared_interfaces() function
PHP get_defined_functions() function
PHP instanceof
PHP serialize() function