class_alias

PHP 5 >= 5.3.0, PHP 7, PHP 8
class_alias - Creates an alias for a class
Manual
Code Examples

class_alias( string$class, string$alias, [bool$autoload = true] ): bool

Creates an alias named alias based on the user defined class class. The aliased class is exactly the same as the original class.

Parameters

class

The original class.

alias

The alias name for the class.

autoload

Whether to autoload if the original class is not found.

Return Values

Returns true on success or false on failure.

Related Functions

Example of class_alias

Show all examples for class_alias

PHP Version:


Function class_alias:

Class/Object Information Functions

Most used PHP functions