php man page for class_alias

Query: class_alias

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

CLASS_ALIAS(3)								 1							    CLASS_ALIAS(3)

class_alias - Creates an alias for a class

SYNOPSIS
bool class_alias TRUE (string $original, string $alias, [bool $autoload])
DESCRIPTION
Creates an alias named $alias based on the user defined class $original. The aliased class is exactly the same as the original class.
PARAMETERS
o $original - The original class. o $alias - The alias name for the class. o $autoload - Whether to autoload if the original class is not found.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1 class_alias(3) example <?php class foo { } class_alias('foo', 'bar'); $a = new foo; $b = new bar; // the objects are the same var_dump($a == $b, $a === $b); var_dump($a instanceof $b); // the classes are the same var_dump($a instanceof foo); var_dump($a instanceof bar); var_dump($b instanceof foo); var_dump($b instanceof bar); ?> The above example will output: bool(true) bool(false) bool(true) bool(true) bool(true) bool(true) bool(true)
SEE ALSO
get_parent_class(3), is_subclass_of(3). PHP Documentation Group CLASS_ALIAS(3)
Related Man Pages
get_class(3) - php
isset(3) - php
is_a(3) - php
method_exists(3) - php
parsekit_func_arginfo(3) - php
Similar Topics in the Unix Linux Community
adding a new alias to Aliases
sleepless
the meaning of &quot;!:*&quot; in &quot;alias foo 'command\!:*' filename&quot;
Unexpected command/filename substitution ( caused by alias?)