phpday 2027 - Call for Papers

ReflectionFunctionAbstract::getName

(PHP 5 >= 5.2.0, PHP 7, PHP 8)

ReflectionFunctionAbstract::getName — Gets function name

Description

public function ReflectionFunctionAbstract::getName(): string

Get the name of the function.

Parameters

This function has no parameters.

Return Values

The name of the function.

User Contributed Notes 1 note

up
3
PR
5 years ago
If you call getName() on an anonymous function you'll get "{closure}".
Adding new notes is disabled. Please see the links in the Found A Problem? section.
To Top