Documentation

ReflectionLanguageConstruct extends ReflectionFunctionAbstract
in package

A fake ReflectionFunction but for language constructs.

Table of Contents

$keyword  : mixed
$languageConstructs  : mixed
Language construct parameter definitions.
__construct()  : mixed
Construct a ReflectionLanguageConstruct object.
__toString()  : string
To string.
export()  : mixed
This can't (and shouldn't) do anything :).
getFileName()  : bool
Gets the file name from a language construct.
getName()  : string
Get language construct name.
getParameters()  : array<string|int, mixed>
Get language construct params.
isLanguageConstruct()  : bool
Check whether keyword is a (known) language construct.
returnsReference()  : bool
None of these return references.

Properties

$languageConstructs

Language construct parameter definitions.

private static mixed $languageConstructs = ['isset' => ['var' => [], '...' => ['isOptional' => true, 'defaultValue' => null]], 'unset' => ['var' => [], '...' => ['isOptional' => true, 'defaultValue' => null]], 'empty' => ['var' => []], 'echo' => ['arg1' => [], '...' => ['isOptional' => true, 'defaultValue' => null]], 'print' => ['arg' => []], 'die' => ['status' => ['isOptional' => true, 'defaultValue' => 0]], 'exit' => ['status' => ['isOptional' => true, 'defaultValue' => 0]]]

Methods

__construct()

Construct a ReflectionLanguageConstruct object.

public __construct(string $keyword) : mixed
Parameters
$keyword : string
Return values
mixed

export()

This can't (and shouldn't) do anything :).

public static export(mixed $name) : mixed
Parameters
$name : mixed
Tags
throws
RuntimeException
Return values
mixed

getFileName()

Gets the file name from a language construct.

public getFileName() : bool

(Hint: it always returns false)

Return values
bool

false

getParameters()

Get language construct params.

public getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

isLanguageConstruct()

Check whether keyword is a (known) language construct.

public static isLanguageConstruct(string $keyword) : bool
Parameters
$keyword : string
Return values
bool

Search results